Is there a code in functions.php that I can add to disable or hide “collapse menu” button?

The one that is on the left side of the admin menu in the dashboard. I’d need it for both admin, authors, contributors.

3 Answers
3

Here is a simple css display: none function, it just adds some css in the html, if there are more stuff that you want to hide i recommend you to add a new css-file with the function admin_enqueue_scripts

function wpse_remove_collapse() {
   echo '<style type="text/css">#collapse-menu { display: none; visibility: hidden; }</style>';
}
add_action('admin_head', 'wpse_remove_collapse');

Leave a Reply

Your email address will not be published. Required fields are marked *