-
Home
-
Pro Author Review
- Tips
How to Hide Pro Author Review Admin Menus
function plt_hide_pro_author_review_menus() {
//Hide "Reviews".
remove_menu_page('edit.php?post_type=parreview');
//Hide "Reviews → All reviews".
remove_submenu_page('edit.php?post_type=parreview', 'edit.php?post_type=parreview');
//Hide "Reviews → Add new review".
remove_submenu_page('edit.php?post_type=parreview', 'post-new.php?post_type=parreview');
//Hide "Reviews → Settings".
remove_submenu_page('edit.php?post_type=parreview', 'pro-author-review');
}
add_action('admin_menu', 'plt_hide_pro_author_review_menus', 11);
Where do I put this code?
How to Hide the "Review options" Meta Box
function plt_hide_pro_author_review_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Review options" meta box.
remove_meta_box('pro_author_review_meta', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_pro_author_review_metaboxes', 20);