Home Forums Front-end Issues Disable Toggle


Disable Toggle

  • Hi everyone,

    I’m looking to disable the toggle from the acf-groups in my Options section. The reason being is that I want to force users to see the boxes and not potentially click on the #handlediv and close a section. Is there any easy javascript solution for this? Thanks!

  • Hi @spinner903,

    Thanks for the post.

    To remove any item from the screen options menu, you would need to hook into the wp admin_head action and add a {display : none} attribute to the div. An example of this code would look like this:

    ***** Disable option
    add_action( 'admin_head', 'remove_wordpress_cfields' );
    function remove_wordpress_cfields() {
    echo '<style>#postcustom { display: none; }</style>';
    echo '<style>label[for=postcustom-hide] { display: none; }</style>';
  • Disabling toggle option of metaboxes is rather WordPress related question than ACF. I’ve just created a script that handles that issue, see it should be helpful.

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

You must be logged in to reply to this topic.