Skip to content

[Dataviews] Add discussion filter support to Pages - #77553

Open
sarthaknagoshe2002 wants to merge 2 commits into
WordPress:trunkfrom
sarthaknagoshe2002:fix/issue-73298
Open

sarthaknagoshe2002 wants to merge 2 commits into
WordPress:trunkfrom
sarthaknagoshe2002:fix/issue-73298

Conversation

@sarthaknagoshe2002

Copy link
Copy Markdown
Contributor

What?

Closes #73298

Adds support for filtering the Pages Data View by discussion status. Users can filter pages based on whether comments are open or closed.

Why?

The Pages Data View already exposes discussion information through the discussion field, but filtering was disabled. This made it difficult to quickly find pages with comments enabled or disabled, especially on larger sites.

How?

This PR enables filtering for the existing discussion field and applies the filter client-side in the Pages Data View by filtering records based on their comment_status.

Testing Instructions

  1. Go to Site Editor → Pages.
  2. Create or edit a few pages with different discussion settings:
    i. One page with discussions enabled.
    ii. One page with discussions disabled.
  3. Open the Pages Data View filters.
  4. Add the “Discussion” filter.
  5. Select open and verify only pages with discussions: open are shown.
  6. Change the filter to closed and verify only pages with discussions: closed are shown.
  7. Remove the filter and verify all pages appear again.

Screenshots or screencast

image

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: sarthaknagoshe2002 <sarthaknagoshe2002@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions Bot added [Package] Edit Site /packages/edit-site [Package] Fields /packages/fields labels Apr 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Edit Site /packages/edit-site [Package] Fields /packages/fields

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pages DataView: Add discussion field/filter

1 participant