Search
 
SCRIPT & CODE EXAMPLE
 

PHP

hide category menu from custom post type

<?php

function by_remove_menu_pages() {
	// remove testimonials menu section
	// remove_menu_page( 'edit.php?post_type=testimonials-widget' );
	// remove categories
	remove_submenu_page( 'edit.php?post_type=testimonials-widget', 'edit-tags.php?taxonomy=category&amp;post_type=testimonials-widget' );
	// remove tags
	remove_submenu_page( 'edit.php?post_type=testimonials-widget', 'edit-tags.php?taxonomy=post_tag&amp;post_type=testimonials-widget' );
	// remove settings
	remove_submenu_page( 'edit.php?post_type=testimonials-widget', 'testimonialswidget_settings' );
}

add_action( 'admin_menu', 'by_remove_menu_pages', 999 );
Comment

PREVIOUS NEXT
Code Example
Php :: php how to concatenate strings 
Php :: google sheets to php equation 
Php :: creating custom database 
Php :: laravel collection zip 
Php :: PHP Dependency Resolver 
Php :: Code début Selenium PHP 
Php :: utf8mb4 decode in php 
Php :: aravel cache store does not support tagging 
Php :: wordpress php 
Php :: how to remove index.php in codeigniter 3 route 
Php :: laravel postgres deadlock 
Php :: Éviter le spam de commentaires 
Php :: how to get session variables from cookie string 
Php :: pass variable in laravel ancher tag laravel 8 
Php :: how to set tinyint default 0 laravel migration 
Php :: laravel restore deleted 
Php :: How to calculate age using query builder in laravel? 
Php :: how to fix Undefined variable: product (View: C:xampphtdocsecommerce esourcesviewslivewireshop-component.blade.php) 
Php :: Round A Number 
Php :: php mysql insert record if not exists in table 
Php :: no cache on browser back php 
Php :: orwhere raw where condtion 
Php :: Who is known as the father of PHP? 
Php :: without login cant purchase woocommerce 
Php :: edit order of columns for wordpress 
Php :: avoid grouping databases in phpmyadmin 
Php :: htaccess file for multisite 
Php :: codeigniter without index.php not working 
Php :: ifmodule condition in htaccess 
Php :: ubuntu add phpstorm to launcher 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =