Support

Account

Home Forums General Issues ACF-JSON shared for Child Themes

Unread

ACF-JSON shared for Child Themes

  • Hi there, since I am having multiple child themes but all of them make use of the same custom fields and other common parts, I introduced a folder in the themes directory called “commons”.
    My Idea now is, to have the acf-json folder in that place too, so that every child theme fetches (and obviously writes) the fields from there using get_theme_roots()”

    
    
    function my_acf_json_save_point( $path ) {
        return get_theme_roots() . '/commons/';
    }
    add_filter( 'acf/settings/save_json', 'my_acf_json_save_point' );
    
    

    Does anyone of you have concerns in doing so?

    What I am not sure about is, if that messes up anything or not at all?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.