-
Home
-
Recencio Book Reviews
- Tips
How to Hide Recencio Book Reviews Admin Menus
function plt_hide_recencio_book_reviews_menus() {
//Hide "Reviews".
remove_menu_page('edit.php?post_type=rcno_review');
//Hide "Reviews → All Reviews".
remove_submenu_page('edit.php?post_type=rcno_review', 'edit.php?post_type=rcno_review');
//Hide "Reviews → Add New Review".
remove_submenu_page('edit.php?post_type=rcno_review', 'post-new.php?post_type=rcno_review');
//Hide "Reviews → Categories".
remove_submenu_page('edit.php?post_type=rcno_review', 'edit-tags.php?taxonomy=category&post_type=rcno_review');
//Hide "Reviews → Tags".
remove_submenu_page('edit.php?post_type=rcno_review', 'edit-tags.php?taxonomy=post_tag&post_type=rcno_review');
//Hide "Reviews → Authors".
remove_submenu_page('edit.php?post_type=rcno_review', 'edit-tags.php?taxonomy=rcno_author&post_type=rcno_review');
//Hide "Reviews → Genres".
remove_submenu_page('edit.php?post_type=rcno_review', 'edit-tags.php?taxonomy=rcno_genre&post_type=rcno_review');
//Hide "Reviews → Series".
remove_submenu_page('edit.php?post_type=rcno_review', 'edit-tags.php?taxonomy=rcno_series&post_type=rcno_review');
//Hide "Reviews → Publishers".
remove_submenu_page('edit.php?post_type=rcno_review', 'edit-tags.php?taxonomy=rcno_publisher&post_type=rcno_review');
//Hide "Reviews → Settings".
remove_submenu_page('edit.php?post_type=rcno_review', 'recencio-book-reviews');
//Hide "Reviews → Extensions".
remove_submenu_page('edit.php?post_type=rcno_review', 'rcno_extensions');
}
add_action('admin_menu', 'plt_hide_recencio_book_reviews_menus', 11);
Where do I put this code?
How to Hide Recencio Book Reviews Meta Boxes
function plt_hide_recencio_book_reviews_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Book Description/Synopsis" meta box.
remove_meta_box('rcno_book_description_metabox', $screen->id, 'normal');
//Hide the "General Information" meta box.
remove_meta_box('rcno_book_general_info_metabox', $screen->id, 'normal');
//Hide the "Review Score" meta box.
remove_meta_box('rcno_book_review_score_metabox', $screen->id, 'normal');
//Hide the "Purchase Links" meta box.
remove_meta_box('rcno_book_buy_links_metabox', $screen->id, 'normal');
//Hide the "ISBN" meta box.
remove_meta_box('rcno_book_isbn_metabox', $screen->id, 'side');
//Hide the "Book Cover" meta box.
remove_meta_box('rcno_book_cover_metabox', $screen->id, 'side');
//Hide the "5 Star Rating" meta box.
remove_meta_box('rcno_book_review_rating_metabox', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_recencio_book_reviews_metaboxes', 20);
How to Hide the "Currently Reading" Dashboard Widget
function plt_hide_recencio_book_reviews_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Currently Reading" widget.
remove_meta_box('rcno_currently_reading', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_recencio_book_reviews_dashboard_widgets', 20);