hide category menu from custom post type

Solutions on MaxInterview for hide category menu from custom post type by the best coders in the world

showing results for - "hide category menu from custom post type"
Hanna
10 Jan 2017
1<?php
2
3function by_remove_menu_pages() {
4	// remove testimonials menu section
5	// remove_menu_page( 'edit.php?post_type=testimonials-widget' );
6	// remove categories
7	remove_submenu_page( 'edit.php?post_type=testimonials-widget', 'edit-tags.php?taxonomy=category&amp;post_type=testimonials-widget' );
8	// remove tags
9	remove_submenu_page( 'edit.php?post_type=testimonials-widget', 'edit-tags.php?taxonomy=post_tag&amp;post_type=testimonials-widget' );
10	// remove settings
11	remove_submenu_page( 'edit.php?post_type=testimonials-widget', 'testimonialswidget_settings' );
12}
13
14add_action( 'admin_menu', 'by_remove_menu_pages', 999 );