Home > other >  How do I hide the categories tab under posts?
How do I hide the categories tab under posts?

Time:12-18

How do I hide the categories tab that you see when you click on the posts in the wordpress dashboard?

enter image description here

CodePudding user response:

You could remove categories submenu by using remove_submenu_page function and admin_menu action hook. Like this:

add_action('admin_menu', 'removing_category_submenu');

function removing_category_submenu()
{
    remove_submenu_page('edit.php', 'edit-tags.php?taxonomy=category');
}

enter image description here

  • Related