PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 8, 2022

[FIXED] How do I hide the categories tab under posts?

 January 08, 2022     custom-wordpress-pages, wordpress, wordpress-theming     No comments   

Issue

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

enter image description here


Solution

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');
}

remove_submenu_pageDocs

enter image description here



Answered By - Ruvee
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing