-
Home
-
Strong Testimonials
- Tips
How to Hide Strong Testimonials Admin Menus
function plt_hide_strong_testimonials_menus() {
//Hide "Testimonials".
remove_menu_page('edit.php?post_type=wpm-testimonial');
//Hide "Testimonials → All Testimonials".
remove_submenu_page('edit.php?post_type=wpm-testimonial', 'edit.php?post_type=wpm-testimonial');
//Hide "Testimonials → Add New".
remove_submenu_page('edit.php?post_type=wpm-testimonial', 'post-new.php?post_type=wpm-testimonial');
//Hide "Testimonials → Categories".
remove_submenu_page('edit.php?post_type=wpm-testimonial', 'edit-tags.php?taxonomy=wpm-testimonial-category&post_type=wpm-testimonial');
//Hide "Testimonials → Views".
remove_submenu_page('edit.php?post_type=wpm-testimonial', 'testimonial-views');
//Hide "Testimonials → Form".
remove_submenu_page('edit.php?post_type=wpm-testimonial', 'testimonial-fields');
//Hide "Testimonials → Settings".
remove_submenu_page('edit.php?post_type=wpm-testimonial', 'testimonial-settings');
//Hide "Testimonials → Shortcodes".
remove_submenu_page('edit.php?post_type=wpm-testimonial', 'testimonial-shortcodes');
//Hide "Testimonials → Logs".
remove_submenu_page('edit.php?post_type=wpm-testimonial', 'strong-testimonials-logs');
//Hide "Testimonials → Extensions".
remove_submenu_page('edit.php?post_type=wpm-testimonial', 'strong-testimonials-addons');
//Hide "Testimonials → Lite vs Pro".
remove_submenu_page('edit.php?post_type=wpm-testimonial', 'strong-testimonials-lite-vs-pro');
}
add_action('admin_menu', 'plt_hide_strong_testimonials_menus', 201);
Where do I put this code?
How to Hide Strong Testimonials Meta Boxes
function plt_hide_strong_testimonials_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Publish" meta box.
remove_meta_box('submitdiv', $screen->id, 'side');
//Hide the "Import" meta box.
remove_meta_box('wpmtst-importer-upsell', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_strong_testimonials_metaboxes', 20);