Hiding individual menu items in the admin panel

To hide individual menu items in the admin panel you can use a number of plugins or just use the function unset() to remove elements of the global array $submenu.

I think an example should make it clearer.. On my test site in the theme folder in the file functions.php paste the code:

The code is workable, a hitch may be if you have already installed third party plugins and they added an item to the admin menu. In such cases, you can use the array output function var_dump() and see which items need to be removed.

An example of viewing the menu list in the admin panel:


Купить хостинг WordPress
WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

 

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal