-
Home
-
Quote Calculator Constructor
- Tips
How to Hide Quote Calculator Constructor Admin Menus
function plt_hide_quote_calculator_constructor_menus() {
//Hide the "Calculators" menu.
remove_menu_page('edit.php?post_type=calculator');
//Hide the "Calculators → All Calculator" menu.
remove_submenu_page('edit.php?post_type=calculator', 'edit.php?post_type=calculator');
//Hide the "Calculators → Add New" menu.
remove_submenu_page('edit.php?post_type=calculator', 'post-new.php?post_type=calculator');
}
add_action('admin_menu', 'plt_hide_quote_calculator_constructor_menus', 15);
Where do I put this code?
How to Hide Quote Calculator Constructor Meta Boxes
function plt_hide_quote_calculator_constructor_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Calculator Constructor" meta box.
remove_meta_box('custom_meta_editor_378', $screen->id, 'advanced');
//Hide the "Calculator Constructor" meta box.
remove_meta_box('custom_meta_editor_199', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_quote_calculator_constructor_metaboxes', 20);