How to hide “Collapse menu” link from WordPress Dashboard?

Here’s an another interesting code snippet I have found over stack exchange which removes “collapse menu” link from WordPress dashboard.

Useful Read: How to limit the number of tags in WordPress tag cloud widget?

Remove “Collapse menu” link from WordPress Dashboard

Remove “Collapse menu” link from WordPress Dashboard

To do this, you need to copy the following code in your functions.php file.

//Remove "Collapse menu" link from WordPress Dashboard
function ccw_remove_collapse_menu_link() {
   echo '<style type="text/css">#collapse-menu { display: none !important; visibility: hidden !important;  }</style>';
}
add_action('admin_head', 'ccw_remove_collapse_menu_link');

 

0 Comments

Leave a Comment.