How to hide custom post type link in WordPress Dashboard from side panel ?

hide custom post type menu from dashboard

So here are the other Queries related to this Topic …..

  • How to hide custom post type options from the wp dashboard ?
  • How to hide custom post type from the wp admin area ?
  • Hide the extra post links from the wp dashboard side panel ?
  • How to disable existing post type in wp dashboard / admin area ?
  • How to remove post type in wp dashboard ?

Sometime we want to hide Post types from the wordpress dashboard … usually this is occur when you use any paid theme …

So here is the way to hide that from the dashboard….

First you have to check the type of the post you want to hide.. like below..

Click on that and copy the last url from the bar….

To remove 1 post type from the dashboard…

function nst_remove_menu_items() {   
        remove_menu_page( 'edit.php?post_type=location' );    
 
}
add_action( 'admin_menu', 'nst_remove_menu_items' );

If you want to remove more than 1 post type then can add that like below:~

function nst_remove_menu_items() {   
    remove_menu_page( 'edit.php?post_type=location' );   
    remove_menu_page( 'edit.php?post_type=testimonial' );
    remove_menu_page( 'edit.php?post_type=mt_blog' );
 
}
add_action( 'admin_menu', 'nst_remove_menu_items' );

That’s it ..😇

I hope this helps you …. Fell free to contact with us… 😇

Thanks 🙏

If this help you then.. Can you buy a Cup of Coffee for me by nst webcreation paypal--OR-- nst webcreation blog coffee cup

Published by

Narender Singh

Myself Narender Singh Thakur ( NST ) and i share my Experience/Knowledge and Tricks for folks and beginners to solve their issues while making websites through this Planet.

Related Articles

Leave a Reply

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

Click to Chat