Support

Account

Home Forums Backend Issues (wp-admin) All custom fields showing in all post types regardless of Location rules

Solved

All custom fields showing in all post types regardless of Location rules

  • Hi Elliot,

    Custom fields are showing up for me in all post edit screens, regardless of the location rules for those field groups.
    This is a recent development.

    ACF Pro 5.7.0
    WP 4.9.7

  • I experienced the exact same symptoms when I upgraded to 5.7.0. Field Groups out of their expected context, and those spinners. Same version of WP also. I just backed out of the update figured I’d wait and see if there is a 5.7.1 released soon.

  • thanks to another user on this forum, I realised that I’d caused this issue by loading all scripts including jQuery with the ‘defer’ tag.
    the code, which filters all enqueued scripts now looks like this:

    function add_async_attribute($tag, $handle) {
        if (!is_admin()) return str_replace( ' src', ' defer="defer" src', $tag );
        return $tag;
    }
    add_filter('script_loader_tag', 'add_async_attribute', 10, 2); 

    i.e. it’s turned off for admin pages, so that scripts load before inline ACF code is executed.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘All custom fields showing in all post types regardless of Location rules’ is closed to new replies.