Home › Forums › ACF PRO › acf-json fields not loading from parent theme › Reply To: acf-json fields not loading from parent theme
I’ve been using this for a while without issue. I sometimes modify a field group imported from the parent within the child theme. It simply saves a new acf-json file into the child theme.
This used to work fine but I my posts are suddenly only rendering the group as defined in the parent. So I had to flip the load order though I have no idea why.
add_filter('acf/settings/load_json', function($paths) {
$paths = array();
if(is_child_theme())
{
$paths[] = get_stylesheet_directory() . '/acf-json';
}
$paths[] = get_template_directory() . '/acf-json';
return $paths;
});
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.