-
Home
-
Testimonial – Testimonial Slider and Showcase Plugin
- Tips
How to Hide Testimonial Slider and Showcase Admin Menus
function plt_hide_testimonial_slider_and_showcase_menus() {
//Hide "Testimonial".
remove_menu_page('edit.php?post_type=testimonial');
//Hide "Testimonial → All Testimonials".
remove_submenu_page('edit.php?post_type=testimonial', 'edit.php?post_type=testimonial');
//Hide "Testimonial → Add Testimonial".
remove_submenu_page('edit.php?post_type=testimonial', 'post-new.php?post_type=testimonial');
//Hide "Testimonial → ShortCode".
remove_submenu_page('edit.php?post_type=testimonial', 'edit.php?post_type=tss-sc');
//Hide "Testimonial → Settings".
remove_submenu_page('edit.php?post_type=testimonial', 'tss_settings');
//Hide "Testimonial → Get Help".
remove_submenu_page('edit.php?post_type=testimonial', 'tss_get_help');
}
add_action('admin_menu', 'plt_hide_testimonial_slider_and_showcase_menus', 100);
Where do I put this code?
How to Hide Testimonial Slider and Showcase Meta Boxes
function plt_hide_testimonial_slider_and_showcase_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Short Code Generator" meta box.
remove_meta_box('rt_tss_sc_settings_meta', $screen->id, 'normal');
//Hide the "Layout Preview" meta box.
remove_meta_box('rt_tss_sc_preview_meta', $screen->id, 'normal');
//Hide the "Documentation" meta box.
remove_meta_box('rt_plugin_tss_sc_pro_information', $screen->id, 'side');
//Hide the "Testimonials Information" meta box.
remove_meta_box('tss_meta_information', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_testimonial_slider_and_showcase_metaboxes', 20);