So I must not be explaining clearly. The child theme’s field group has been changed from the parent theme. The parent theme and the child theme each depend on their own fields in this group. The problem is this field group’s key id is the same in each json file.
example:
parent_theme/acf-json/group_5d28b22d3fdc0.json -> unique fields
child_theme/acf-json/group_5d28b22d3fdc0.json -> unique fields
The initial developer must have modified the fields in the child theme, which worked initially, but now only the parent theme fields are loading in the child theme.
I’m trying to get the child theme field groups to work properly again. But I don’t know where to start because the field group keys are the same in the parent and child themes.
John, Thanks for your quick reply.
In this case, the parent and child theme field groups do not require further or ongoing editing. I understand how a parent and child theme relationship should work. Like I said I inherited this project so trying to clean things up. I am also finding evidence that the original developer might not have understood how to load all field group properly as their calls to some group options create errors in php 8 when returning null values. Anyway…
Currently the child theme and the parent theme share two files with the same group key. And what happens is that the parent theme json file gets used over the child file.
Would you recommend I rebuild the child fields and just redo all the data entry? or is there another “easier” method. Like, can I recreate a unique group key in the child theme and move forward from there?
I’m wondering if this is the solution I am looking for. Only load some of the acf-json files from the parent.
https://support.advancedcustomfields.com/forums/topic/parent-child-theme-json-sync/#post-56714
It doesn’t look like you are calling for the field group properly. Are you trying to access a repeater field? Your question needs more information.
The BuddyPress Group Extras plugin looked awesome, but as of this comment isn’t supported anymore. Hasn’t been updated in over 2 years.
You can compare meta values using meta_query in your arguments before starting the loop.
Check out the WordPress Codex on this topic. https://codex.wordpress.org/Class_Reference/WP_Meta_Query
Have you looked at the meta_query argument? You can pass this through your post arguments when you start the loop.
https://codex.wordpress.org/Class_Reference/WP_Meta_Query
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.