-
Home
-
Social Icons & Sharing Buttons by WPZOOM
- Tips
How to Hide Social Icons & Sharing Buttons by WPZOOM Admin Menus
function plt_hide_social_icons_widget_by_wpzoom_menus() {
//Hide "Icons Sharing".
remove_menu_page('edit.php?post_type=wpzoom-shortcode');
//Hide "Icons Sharing → Icon Sets".
remove_submenu_page('edit.php?post_type=wpzoom-shortcode', 'edit.php?post_type=wpzoom-shortcode');
//Hide "Icons Sharing → Sharing Buttons".
remove_submenu_page('edit.php?post_type=wpzoom-shortcode', 'http://127.0.0.1/wp-admin/post.php?post=39&action=edit');
//Hide "Icons Sharing → Settings".
remove_submenu_page('edit.php?post_type=wpzoom-shortcode', 'wpzoom-social-icons-widget');
}
add_action('admin_menu', 'plt_hide_social_icons_widget_by_wpzoom_menus', 11);
Where do I put this code?
How to Hide the "Display Settings" Meta Box
function plt_hide_social_icons_widget_by_wpzoom_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Display Settings" meta box.
remove_meta_box('wpzoom_sharing_settings', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_social_icons_widget_by_wpzoom_metaboxes', 20);