-
Notifications
You must be signed in to change notification settings - Fork 125
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
ACF Options Sub Page support #132
Comments
You need |
Hello,
However, when I open my graphql page from gatsby, Thank you ! EDIT: add GRAPHQL query and response query:
response:
|
👋🏻 sorry for the delay here, but Options Pages are now supported (and tested) with v0.5.0 (#250) When you register an options page and set it to Below is a screenshot of the new GraphQL Settings in action: I used the following code to register some options pages: acf_add_options_page(array(
'page_title' => 'Theme General Settings',
'menu_title' => 'Theme Settings',
'menu_slug' => 'theme-general-settings',
'capability' => 'edit_posts',
'redirect' => false,
'show_in_graphql' => true,
'graphql_field_name' => 'ThemeGeneralSettings',
));
acf_add_options_sub_page(array(
'page_title' => 'Theme Header Settings',
'menu_title' => 'Header',
'parent_slug' => 'theme-general-settings',
'menu_slug' => 'theme-header-settings',
'show_in_graphql' => true,
'graphql_field_name' => 'ThemeHeaderSettings',
));
acf_add_options_sub_page(array(
'page_title' => 'Theme Footer Settings',
'menu_title' => 'Footer',
'parent_slug' => 'theme-general-settings',
'menu_slug' => 'theme-footer-settings',
'show_in_graphql' => true,
'graphql_field_name' => 'ThemeFooterSettings',
)); And now when I set the Field Group to show on the "Theme General Settings" options page, you can see it's checked in the "GraphQL Types to Show the Field Group On" option below. |
Hi there,
I'm starting to work on my first headless project using GraphQL and I like it a lot!
As described here I can query my ACF options page just fine, however I like to organize my options in several sub pages as described here using the
acf_add_options_sub_page
acf function. Unfortunately this is not supported yet.With the following code:
Only this query will return data because of the
redirect
parameter:But Sub Options 2 is not querable at the moment.
Do you have any plans on adding support for this in the near future?
Thanks a lot!
The text was updated successfully, but these errors were encountered: