-
Notifications
You must be signed in to change notification settings - Fork 122
ACF Field Groups not showing when set to show on equal page filter #22
Comments
Might be a duplicate of #1 |
I'm struggling with a similar, if not the same issue here — A field group will show up in the schema when location is all pages via post type. However if I add an |
@omattman @jasonbahl Was a solution found for this? |
@brianshimkus I didn't manage to find a solution. However, I changed my acf for regular pages to act as a page builder (all blocks are available to all post types of "Page"). This way I was able to source all available blocks to the pages that requested a set of the available ACF blocks. In hindsight, it took a lot of restructuring but engineering wise it is, from my perspective, a way more maintainable and feasible solution as data flows through one controller and dispatches it to the individual pages. |
@omattman Thanks for the quick response. I ended up stripping out all of the wp-graphql plug-ins from my project and instead installed "ACF to REST API" with great success. |
@brianshimkus I started with that plugin, and it works perfectly. I only switched to wp-graphql-acf when it was backed up by the Gatsby team themselves. You will be perfectly fine! |
I believe this is similar to an issue I've just resolved, take a look at my pull request #134 |
👋🏻 This has been resolved by v0.5.0 (#250) The Location Rules have been completely re-worked and you can now set a Field Group to a specific page and it will be applied to the Page type in the Schema. You can see this in action below: This video also walks through the changes: https://www.youtube.com/watch?v=VvrZGrcwv0Y |
When creating ACF Field Groups and setting the filter for instance as:
The ACF field isn't queryable through the
pageBy
withuri
. This is the example of the query I ran to find this issue:Which returns the error:
If one remove the filter and set it to display on all pages it is perfectly queryable in the GraphQL schema.
The text was updated successfully, but these errors were encountered: