-
Notifications
You must be signed in to change notification settings - Fork 19
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
Querying Options Pages #6
Comments
I am not sure what you mean by option pages. |
https://www.advancedcustomfields.com/resources/options-page/ Admin option pages. |
I figured out how to make this work. I'll make a fork |
PRs are always welcome! |
@Ninodevo how did you solve getting Option pages from all languages? |
@simongoot I've created a CPT "option pages" and had them translated I didn't manage to get ACF Options Pages in other languages |
Any progress on getting options pages translated @rburgst ? |
I'm hoping someone made some progress on this since. Would it be possible to add a "where" argument to options page queries like they exist for custom post types? That way, one could query the options given a specific language. |
Really need this functionality. Any progress/solution? |
I'm trying to make this work in a fork. There don't seem to be any hooks in the WP GraphQL for ACF code to hook into the options pages anywhere. I tried to add a If anyone can help to come up with a working fix, that'd be appreciated. My next step / attempt will be to try to manually register all options pages again and then run the code from WP GraphQL for ACF to add the groups to the options page fields. |
Imho unregistering Graphql fields won’t achieve a lot. You need to see how the data is loaded within WordPress and what wpml is doing to prevent all options to appear. Then you need to check whether there is a way to prevent wpml from doing that. Typically this is done by overwriting some wpml state variables. |
Normally, the query for an options page returns only one page, there is no way to return all options pages at once. So each of those queries returns one page, in the default language. My goal is to add an argument to each of those queries, and use the argument to change the active language in WPML / sitepress. At least for my usecase, it should function similarly to PR #32. |
I just managed to solve this issue, quite simply. The issue I encountered previously was caused by me missing a line of code that sets the |
For those who need this functionality, you can use this branch on my fork until the PR is accepted. |
+1 |
Is it possible to query option pages (created with ACF) in different languages?
The text was updated successfully, but these errors were encountered: