-
Home
-
Themify Store Locator
- Tips
How to Hide Themify Store Locator Admin Menus
function plt_hide_themify_store_locator_menus() {
//Hide "Store Locations".
remove_menu_page('edit.php?post_type=themify_storelocator');
//Hide "Store Locations → Manage Locations".
remove_submenu_page('edit.php?post_type=themify_storelocator', 'edit.php?post_type=themify_storelocator');
//Hide "Store Locations → Add New Location".
remove_submenu_page('edit.php?post_type=themify_storelocator', 'post-new.php?post_type=themify_storelocator');
//Hide "Store Locations → Categories".
remove_submenu_page('edit.php?post_type=themify_storelocator', 'edit-tags.php?taxonomy=store_category&post_type=themify_storelocator');
//Hide "Store Locations → Settings".
remove_submenu_page('edit.php?post_type=themify_storelocator', 'themify-sl-setting');
//Hide "Store Locations → About".
remove_submenu_page('edit.php?post_type=themify_storelocator', 'themify-sl-about');
}
add_action('admin_menu', 'plt_hide_themify_store_locator_menus', 11);
Where do I put this code?
How to Hide the "Themify Custom Panel" Meta Box
function plt_hide_themify_store_locator_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Themify Custom Panel" meta box.
remove_meta_box('themify-meta-boxes', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_themify_store_locator_metaboxes', 20);