Support

Account

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

Solving

Disable "Edit Field Group" Shortcut from Posts

  • I think this feature was added recently, but if it has been around longer I have only just noticed.

    When a user is editing e.g. a page on the back-end, there is now a settings “cog” icon that appears in the field group on the page. When the user clicks this, it gives them direct access to edit the custom fields in that field group. This is highly undesirable for how my agency uses ACF Pro with clients, as the entire idea is for us to build the fields for them, and then hand off the shiny editing screens to the client without them being able to access the field internals.

    How can we disable the shortcut icon from appearing? I looked through the forums here and was surprised to see that no one else seems to be having trouble with this. This morning one of our clients panicked and deleted an entire field group because they didn’t know what they were doing. (Clients are sometimes like little children lol!)

  • I agree with the comment.

    The display of this is set by the user role and their access to the site.

    You can alter the permission to edit field groups by modifying the ACF capability setting https://www.advancedcustomfields.com/resources/acf-settings/

    Unfortunately, if your user is an admin this won’t do you much good.

    You can also hide the admin https://www.advancedcustomfields.com/resources/how-to-hide-acf-menu-from-clients/

  • Thanks for the quick reply John!

    Our sites do already have the admin menu hidden from clients (including the Admin role), however that doesn’t seem to prevent this particular issue.

    I’ll need to look into the ACF capability settings – I wasn’t aware of that feature. Thank you for the link!

  • The default setting might be edit_posts or something similar and you’ll need to change it.

    • Beee

    • September 3, 2018 at 7:37 pm

    @mtv.jcil did you succeed ?

  • Hi Beee, sorry for the late response. I was facing a limited deadline and project budget, so instead I opted with the client to train employees not to click the link. Not a real solution unfortunately :/

    • Beee

    • November 1, 2018 at 12:08 pm

    The option John linked to also hides the cogwheel. Isn’t that what you want ?

    • timbr

    • May 23, 2020 at 4:55 am

    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
    });
    
    
    • Beee

    • May 24, 2020 at 12:00 pm

    I would recommend using your option @brugman.
    Correct me if I’m wrong, but I can’t see an option where the filter is not sufficient…

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

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.