-
Home
-
Precious Metals Charts and Widgets for WordPress
- Tips
How to Hide WP nFusion Solutions Widgets Admin Menus
function plt_hide_precious_metals_chart_and_widgets_menus() {
//Hide the "nFusion Widgets" menu.
remove_menu_page('edit.php?post_type=nfusion-widgets');
//Hide the "nFusion Widgets → All nFusion Widgets" menu.
remove_submenu_page('edit.php?post_type=nfusion-widgets', 'edit.php?post_type=nfusion-widgets');
//Hide the "nFusion Widgets → Add New nFusion Widgets" menu.
remove_submenu_page('edit.php?post_type=nfusion-widgets', 'post-new.php?post_type=nfusion-widgets');
}
add_action('admin_menu', 'plt_hide_precious_metals_chart_and_widgets_menus', 15);
Where do I put this code?
How to Hide WP nFusion Solutions Widgets Meta Boxes
function plt_hide_precious_metals_chart_and_widgets_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Widget Options" meta box.
remove_meta_box('nFusion_member_widgets_option_box', $screen->id, 'normal');
//Hide the "ShortCode" meta box.
remove_meta_box('nFusion_member_shortcode_box', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_precious_metals_chart_and_widgets_metaboxes', 20);