Support

Account

Home Forums Backend Issues (wp-admin) Use of acf/init causing server overload of child processes Reply To: Use of acf/init causing server overload of child processes

  • I have no idea why this is causing your problem. But I can say that you have put far too much inside of your acf/init function.

    For example, nested functions, these do not need to be in there. Also addding other filters like acf/settings/load_json does not need to be added in this way.

    The only thing that you can’t do is use get_field() and other function to get values from ACF fields before acf/init

    As far as I can see the only things that you need to worry about calling after acf/init are the following lines.

    
    $subsites_sitemap_is_enabled = get_field( 'subsites_sitemap_is_enabled', 'option' );
    $subsites_sitemap_field_slug = get_subsites_sitemap_field( 'slug' );
    $subsites_sitemap_field_post_type = get_subsites_sitemap_field( 'post_type' );
    $subsites_post_slugs_to_exclude = get_subsites_sitemap_field( 'slugs_to_exclude' );