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
});
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.