-
Home
-
Testimonial
- Tips
How to Hide C4D Testimonial Admin Menus
function plt_hide_c4d_testimonial_menus() {
//Hide the "C4D Testimonial" menu.
remove_menu_page('edit.php?post_type=c4d-testimonial');
//Hide the "C4D Testimonial → C4D Testimonial" menu.
remove_submenu_page('edit.php?post_type=c4d-testimonial', 'edit.php?post_type=c4d-testimonial');
//Hide the "C4D Testimonial → Add New Post" menu.
remove_submenu_page('edit.php?post_type=c4d-testimonial', 'post-new.php?post_type=c4d-testimonial');
}
add_action('admin_menu', 'plt_hide_c4d_testimonial_menus', 15);
Where do I put this code?
How to Hide the "Optios" Meta Box
function plt_hide_c4d_testimonial_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Optios" meta box.
remove_meta_box('c4d-testimonial__options-config', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_c4d_testimonial_metaboxes', 20);