-
Home
-
Geo Controller
- Tips
How to Hide Geo Controller Admin Menus
function plt_hide_cf_geoplugin_menus() {
//Hide "SEO Redirection".
remove_menu_page('cf-geoplugin-seo-redirection');
//Hide "SEO Redirection → SEO Redirection".
remove_submenu_page('cf-geoplugin-seo-redirection', 'http://127.0.0.1/wp-admin/admin.php?page=cf-geoplugin-seo-redirection');
//Hide "SEO Redirection → Add New".
remove_submenu_page('cf-geoplugin-seo-redirection', 'http://127.0.0.1/wp-admin/admin.php?page=cf-geoplugin-seo-redirection&action=new&nonce=19e07e1fc2');
//Hide "SEO Redirection → Import/Export".
remove_submenu_page('cf-geoplugin-seo-redirection', 'http://127.0.0.1/wp-admin/admin.php?page=cf-geoplugin-seo-redirection&action=import&nonce=9079a1a553');
//Hide "Geo Controller".
remove_menu_page('cf-geoplugin');
//Hide "Geo Controller → Geo Controller".
remove_submenu_page('cf-geoplugin', 'cf-geoplugin');
//Hide "Geo Controller → Site Protection".
remove_submenu_page('cf-geoplugin', 'cf-geoplugin-defender');
//Hide "Geo Controller → Geo Banner".
remove_submenu_page('cf-geoplugin', 'http://127.0.0.1/wp-admin/edit.php?post_type=cf-geoplugin-banner');
//Hide "Geo Controller → Postcodes".
remove_submenu_page('cf-geoplugin', 'http://127.0.0.1/wp-admin/edit-tags.php?taxonomy=cf-geoplugin-postcode&post_type=cf-geoplugin-banner');
//Hide "Geo Controller → Debug Mode".
remove_submenu_page('cf-geoplugin', 'cf-geoplugin-debug');
//Hide "Geo Controller → Settings".
remove_submenu_page('cf-geoplugin', 'cf-geoplugin-settings');
//Hide "Geo Controller → Activate Unlimited".
remove_submenu_page('cf-geoplugin', 'cf-geoplugin-activate');
}
add_action('admin_menu', 'plt_hide_cf_geoplugin_menus', 11);
Where do I put this code?
How to Hide the "SEO Redirection" Meta Box
function plt_hide_cf_geoplugin_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "SEO Redirection" meta box.
remove_meta_box('cf-geoplugin-page-seo-redirection', $screen->id, 'advanced');
}
add_action('add_meta_boxes', 'plt_hide_cf_geoplugin_metaboxes', 20);
How to Hide Geo Controller Dashboard Widgets
function plt_hide_cf_geoplugin_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Geo Controller Live News & Info" widget.
remove_meta_box('cf-geoplugin-dashboard-feed', 'dashboard', 'normal');
//Remove the "Geo Controller" widget.
remove_meta_box('cf-geoplugin-dashboard-statistic', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_cf_geoplugin_dashboard_widgets', 20);