Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering pages based on template filter in where condition #1638

Open
PieterT2000 opened this issue Dec 28, 2020 · 7 comments
Open

Filtering pages based on template filter in where condition #1638

PieterT2000 opened this issue Dec 28, 2020 · 7 comments
Labels
Component: Connections Issues related to connections ObjectType: Post Issues related to the Post object type in WP scope: docs Affects external, user-facing documentation. Status: Discussion Requires a discussion to proceed Type: Feature

Comments

@PieterT2000
Copy link

I have been trying to filter pages based on template name using where in graphql.
However, the template field doesn't appear in the list. Is there an existing filter we can use to add extra fields to where?
I am looking for something like below:

query xPages {
  pages(where: {template: page-template.php}) {
    edges {
      node {
        id
        title
      }
    }
  }
}
@forestcore
Copy link

forestcore commented Mar 10, 2021

I have the same problem.
But also i can't fetch data if acf fields attached to page template.

@plong0
Copy link
Contributor

plong0 commented Apr 27, 2021

+1 for functionality @PieterT2000 described. I'm game to start working towards a PR as we need that ability for our current project.

But also i can't fetch data if acf fields attached to page template.

@deolino I wonder if this should be its own issue? I see it's related to page templates, but ACF fields seems like a different topic than query args to me.

@bhardie bhardie added Status: Discussion Requires a discussion to proceed Type: Feature Component: Connections Issues related to connections ObjectType: Post Issues related to the Post object type in WP scope: docs Affects external, user-facing documentation. labels May 4, 2021
@DannyChambers
Copy link

Really need this

@stale
Copy link

stale bot commented Aug 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 2, 2022
@PieterT2000 PieterT2000 changed the title Filtering pages on based on template in where condition Filtering pages based on template filter in where condition Aug 9, 2022
@stale stale bot removed the stale label Aug 9, 2022
@stale
Copy link

stale bot commented Nov 7, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale? May need to be revalidated due to prolonged inactivity label Nov 7, 2022
@Branch
Copy link

Branch commented Jan 19, 2023

This would be very useful.

@justlevine justlevine removed the Stale? May need to be revalidated due to prolonged inactivity label Mar 3, 2023
@Branch
Copy link

Branch commented Mar 27, 2023

I'd very much like this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Connections Issues related to connections ObjectType: Post Issues related to the Post object type in WP scope: docs Affects external, user-facing documentation. Status: Discussion Requires a discussion to proceed Type: Feature
Projects
Status: 📍 Confirmed
Development

No branches or pull requests

7 participants