-
Home
-
Modern Hotel Booking
- Tips
How to Hide Modern Hotel Booking Admin Menus
function plt_hide_modern_hotel_booking_menus() {
//Hide "Hotel Booking".
remove_menu_page('mhbo-hotel-booking');
//Hide "Hotel Booking → Hotel Booking".
remove_submenu_page('mhbo-hotel-booking', 'mhbo-hotel-booking');
//Hide "Hotel Booking → Bookings".
remove_submenu_page('mhbo-hotel-booking', 'mhbo-bookings');
//Hide "Hotel Booking → Room Types".
remove_submenu_page('mhbo-hotel-booking', 'mhbo-room-types');
//Hide "Hotel Booking → Rooms".
remove_submenu_page('mhbo-hotel-booking', 'mhbo-rooms');
//Hide "Hotel Booking → Settings".
remove_submenu_page('mhbo-hotel-booking', 'mhbo-settings');
}
add_action('admin_menu', 'plt_hide_modern_hotel_booking_menus', 11);
Where do I put this code?
How to Hide the "Hotel Booking Overview" Dashboard Widget
function plt_hide_modern_hotel_booking_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Hotel Booking Overview" widget.
remove_meta_box('mhbo_dashboard_overview', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_modern_hotel_booking_dashboard_widgets', 20);