Home › Forums › General Issues › Parent & Child Theme JSON Sync › Reply To: Parent & Child Theme JSON Sync
I would set second load point for field groups for the parent theme
add_filter('acf/settings/load_json', 'parent_theme_field_groups');
function parent_theme_field_groups($paths) {
$path = get_template_directory().'/acf-json';
$paths[] = $path;
return $paths;
}
Then I would work on changes to fields in the parent them only on a site that uses the parent theme. I would not Sync, or allow these field groups to be changed in the child theme.
If I want to have additional fields groups in child themes I would only add fields to a site using that theme. Since each child theme would also have an acf-json folder, these files could be synced to any other site using that theme.
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.