-
Home
-
B Testimonial – Testimonial plugin for WP
- Tips
How to Hide B Testimonial - Testimonial plugin for WP Admin Menus
function plt_hide_b_testimonial_menus() {
//Hide "Testimonial".
remove_menu_page('edit.php?post_type=btstestimonial');
//Hide "Testimonial → All Testimonials".
remove_submenu_page('edit.php?post_type=btstestimonial', 'edit.php?post_type=btstestimonial');
//Hide "Testimonial → Add New Testimonial".
remove_submenu_page('edit.php?post_type=btstestimonial', 'post-new.php?post_type=btstestimonial');
//Hide "Testimonial → Category".
remove_submenu_page('edit.php?post_type=btstestimonial', 'edit-tags.php?taxonomy=btscategory&post_type=btstestimonial');
//Hide "Testimonial → Shortcode Generator".
remove_submenu_page('edit.php?post_type=btstestimonial', 'edit.php?post_type=btsshortcode');
}
add_action('admin_menu', 'plt_hide_b_testimonial_menus', 11);
Where do I put this code?
How to Hide B Testimonial - Testimonial plugin for WP Meta Boxes
function plt_hide_b_testimonial_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Options" meta box.
remove_meta_box('bts_meta', $screen->id, 'advanced');
//Hide the "" meta box.
remove_meta_box('btss_meta', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_b_testimonial_metaboxes', 20);