-
Home
-
WP Radio – Worldwide Online Radio Stations Directory for WordPress
- Tips
How to Hide WP Radio Admin Menus
function plt_hide_wp_radio_menus() {
//Hide "Radio Stations".
remove_menu_page('edit.php?post_type=wp_radio');
//Hide "Radio Stations → All Stations".
remove_submenu_page('edit.php?post_type=wp_radio', 'edit.php?post_type=wp_radio');
//Hide "Radio Stations → Add New Station".
remove_submenu_page('edit.php?post_type=wp_radio', 'post-new.php?post_type=wp_radio');
//Hide "Radio Stations → Countries".
remove_submenu_page('edit.php?post_type=wp_radio', 'edit-tags.php?taxonomy=radio_country&post_type=wp_radio');
//Hide "Radio Stations → Genres".
remove_submenu_page('edit.php?post_type=wp_radio', 'edit-tags.php?taxonomy=radio_genre&post_type=wp_radio');
//Hide "Radio Stations → Getting Started".
remove_submenu_page('edit.php?post_type=wp_radio', 'wp-radio-getting-started');
//Hide "Radio Stations → Import Stations".
remove_submenu_page('edit.php?post_type=wp_radio', 'wp-radio-import-stations');
//Hide "Radio Stations → Settings".
remove_submenu_page('edit.php?post_type=wp_radio', 'wp-radio-settings');
//Hide "Radio Stations → Add-Ons".
remove_submenu_page('edit.php?post_type=wp_radio', 'wp-radio-addons');
//Hide "Radio Stations → Upgrade".
remove_submenu_page('edit.php?post_type=wp_radio', 'wp-radio-pricing');
}
add_action('admin_menu', 'plt_hide_wp_radio_menus', 1000000000);
Where do I put this code?
How to Hide WP Radio Meta Boxes
function plt_hide_wp_radio_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Station Information" meta box.
remove_meta_box('wp_radio_metabox', $screen->id, 'normal');
//Hide the "Station Location" meta box.
remove_meta_box('wp_radio_location', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_wp_radio_metaboxes', 20);
How to Hide the "WP Radio Stats - Stations play count per day" Dashboard Widget
function plt_hide_wp_radio_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "WP Radio Stats - Stations play count per day" widget.
remove_meta_box('wp_radio_chart', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_wp_radio_dashboard_widgets', 20);