-
Home
-
Featured Box
- Tips
How to Hide Featured Box Admin Menus
function plt_hide_featured_box_menus() {
//Hide "Featured Box".
remove_menu_page('edit.php?post_type=featuredbox');
//Hide "Featured Box → All Images".
remove_submenu_page('edit.php?post_type=featuredbox', 'edit.php?post_type=featuredbox');
//Hide "Featured Box → Add New Image".
remove_submenu_page('edit.php?post_type=featuredbox', 'post-new.php?post_type=featuredbox');
//Hide "Featured Box → Groups".
remove_submenu_page('edit.php?post_type=featuredbox', 'edit-tags.php?taxonomy=featuredboxgroup&post_type=featuredbox');
//Hide "Featured Box → Help".
remove_submenu_page('edit.php?post_type=featuredbox', 'featuredbox_help.php');
//Hide "Featured Box → Settings".
remove_submenu_page('edit.php?post_type=featuredbox', 'featuredbox_settings.php');
}
add_action('admin_menu', 'plt_hide_featured_box_menus', 11);
Where do I put this code?
How to Hide Featured Box Meta Boxes
function plt_hide_featured_box_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "About Featured Box" meta box.
remove_meta_box('about', $screen->id, 'normal');
//Hide the "Additional parameters" meta box.
remove_meta_box('featuredbox-params-id', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_featured_box_metaboxes', 20);