-
Home
-
LCB Portfolio
- Tips
How to Hide LCB Portfolio Admin Menus
function plt_hide_lcb_portfolio_menus() {
//Hide "Settings → Portfolio".
remove_submenu_page('options-general.php', 'lcb-portfolio-settings');
//Hide "Portfolio".
remove_menu_page('edit.php?post_type=portfolio');
//Hide "Portfolio → Portfolio".
remove_submenu_page('edit.php?post_type=portfolio', 'edit.php?post_type=portfolio');
//Hide "Portfolio → Add new".
remove_submenu_page('edit.php?post_type=portfolio', 'post-new.php?post_type=portfolio');
}
add_action('admin_menu', 'plt_hide_lcb_portfolio_menus', 11);
Where do I put this code?
How to Hide the "Potfolio url" Meta Box
function plt_hide_lcb_portfolio_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Potfolio url" meta box.
remove_meta_box('url-portfolio', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_lcb_portfolio_metaboxes', 20);