-
Home
-
Lead Gen Landing Page
- Tips
How to Hide Lead Gen Landing Pages Admin Menus
function plt_hide_sunnylandingpages_menus() {
//Hide "Landing Page".
remove_menu_page('edit.php?post_type=funlhtmllandingpages');
//Hide "Landing Page → Landing Page".
remove_submenu_page('edit.php?post_type=funlhtmllandingpages', 'edit.php?post_type=funlhtmllandingpages');
//Hide "Landing Page → Add New Post".
remove_submenu_page('edit.php?post_type=funlhtmllandingpages', 'post-new.php?post_type=funlhtmllandingpages');
//Hide "Landing Page → Page Lead data".
remove_submenu_page('edit.php?post_type=funlhtmllandingpages', 'funlleadform');
}
add_action('admin_menu', 'plt_hide_sunnylandingpages_menus', 11);
Where do I put this code?
How to Hide the "Page Settings" Meta Box
function plt_hide_sunnylandingpages_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Page Settings" meta box.
remove_meta_box('funlhtmllandingpages_meta_box', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_sunnylandingpages_metaboxes', 20);