Support

Account

Home Forums Backend Issues (wp-admin) Disable "Edit Field Group" Shortcut from Posts Reply To: Disable "Edit Field Group" Shortcut from Posts

  • I had the same request as OP. I do also hide the menu sometimes, but I want to hide this in a different situation.

    I checked the source code and it looks like this button is added by a big chunk of JS. So there’s no hook to disable this particular feature.

    In this thread @PandS and @Jonathan found the alternative solution of using CSS to hide the cog. So that’s what I’m using now.

    <?php
    
    /**
     * Hide the ACF "Edit field group" cog in metaboxes.
     */
    
    add_action( 'acf/input/admin_head', function () {
    ?>
    <style>
    .acf-postbox > .hndle .acf-hndle-cog { display: none !important; }
    </style>
    <?php
    });