-
Home
-
Advanced Floating Content Lite
- Tips
How to Hide Advanced Floating Content Admin Menus
function plt_hide_advanced_floating_content_lite_menus() {
//Hide the "Advanced Floating Content" menu.
remove_menu_page('edit.php?post_type=ct_afc');
//Hide the "Advanced Floating Content → All Advanced Floating Content" menu.
remove_submenu_page('edit.php?post_type=ct_afc', 'edit.php?post_type=ct_afc');
//Hide the "Advanced Floating Content → Add New Advanced Floating Content" menu.
remove_submenu_page('edit.php?post_type=ct_afc', 'post-new.php?post_type=ct_afc');
}
add_action('admin_menu', 'plt_hide_advanced_floating_content_lite_menus', 11);
Where do I put this code?
How to Hide Advanced Floating Content Meta Boxes
function plt_hide_advanced_floating_content_lite_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Advanced Floating Content" meta box.
remove_meta_box('submitdiv', $screen->id, 'side');
//Hide the "Code Tides" meta box.
remove_meta_box('ct_information', $screen->id, 'side');
//Hide the "Floating Content Details" meta box.
remove_meta_box('advanced_floating_content_meta_box', $screen->id, 'advanced');
//Hide the "Premium Options" meta box.
remove_meta_box('advanced_floating_content_premium_meta_box', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_advanced_floating_content_lite_metaboxes', 20);