-
Home
-
Reviews Carousel
- Tips
How to Hide Reviews Carousel Admin Menus
function plt_hide_reviews_carousel_menus() {
//Hide "Reviews".
remove_menu_page('edit.php?post_type=revica_review');
//Hide "Reviews → Reviews".
remove_submenu_page('edit.php?post_type=revica_review', 'edit.php?post_type=revica_review');
//Hide "Reviews → Add New Post".
remove_submenu_page('edit.php?post_type=revica_review', 'post-new.php?post_type=revica_review');
//Hide "Reviews → Carousel Settings".
remove_submenu_page('edit.php?post_type=revica_review', 'revica_settings');
}
add_action('admin_menu', 'plt_hide_reviews_carousel_menus', 11);
Where do I put this code?
How to Hide the "Upload Review Media" Meta Box
function plt_hide_reviews_carousel_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Upload Review Media" meta box.
remove_meta_box('revica_media_meta_box', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_reviews_carousel_metaboxes', 20);