Home › Forums › Front-end Issues › Disable Toggle › Reply To: Disable Toggle
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>';
}
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.