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 http://wordpress.stackexchange.com/questions/31941/disable-collapse-of-admin-meta-boxes/230410#answer-230410 it should be helpful.