-
Home
-
WebPlus Gallery on WordPress
- Tips
How to Hide WebPlus Gallery Admin Menus
function plt_hide_webplus_gallery_menus() {
//Hide "WebPlus Gallery".
remove_menu_page('edit.php?post_type=webplusgallery');
//Hide "WebPlus Gallery → WebPlus Gallery".
remove_submenu_page('edit.php?post_type=webplusgallery', 'edit.php?post_type=webplusgallery');
//Hide "WebPlus Gallery → Create Gallery".
remove_submenu_page('edit.php?post_type=webplusgallery', 'post-new.php?post_type=webplusgallery');
//Hide "WebPlus Gallery → Pro version".
remove_submenu_page('edit.php?post_type=webplusgallery', 'pro-webplusgallery-version');
}
add_action('admin_menu', 'plt_hide_webplus_gallery_menus', 11);
Where do I put this code?
How to Hide the "WebPlus Gallery" Meta Box
function plt_hide_webplus_gallery_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "WebPlus Gallery" meta box.
remove_meta_box('webplusgallery', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_webplus_gallery_metaboxes', 20);