-
Home
-
Shop Badge Designer
- Tips
How to Hide Shop Badge Designer Admin Menus
function plt_hide_shop_badge_designer_menus() {
//Hide "Shop Badges".
remove_menu_page('edit.php?post_type=wpcsbd-badge');
//Hide "Shop Badges → All Badge".
remove_submenu_page('edit.php?post_type=wpcsbd-badge', 'edit.php?post_type=wpcsbd-badge');
//Hide "Shop Badges → Add New Badge".
remove_submenu_page('edit.php?post_type=wpcsbd-badge', 'post-new.php?post_type=wpcsbd-badge');
//Hide "Shop Badges → Badge Settings".
remove_submenu_page('edit.php?post_type=wpcsbd-badge', 'wpcsbd-badges-settings');
}
add_action('admin_menu', 'plt_hide_shop_badge_designer_menus', 11);
Where do I put this code?
How to Hide Shop Badge Designer Meta Boxes
function plt_hide_shop_badge_designer_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Shop Badge Designer" meta box.
remove_meta_box('wpcsbd_add_badges', $screen->id, 'normal');
//Hide the "Badge Preview" meta box.
remove_meta_box('wpcsbd_preview_badges', $screen->id, 'side');
//Hide the "Shop Badge Designer Setting" meta box.
remove_meta_box('wpcsbd_each_badges_settings', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_shop_badge_designer_metaboxes', 20);