-
Home
-
Easy Property Listings
- Tips
How to Hide Easy Property Listings Admin Menus
function plt_hide_easy_property_listings_menus() {
//Hide "Easy Property Listings".
remove_menu_page('epl-general');
//Hide "Easy Property Listings → Help".
remove_submenu_page('epl-general', 'epl-general');
//Hide "Easy Property Listings → Settings".
remove_submenu_page('epl-general', 'epl-settings');
//Hide "Easy Property Listings → Contacts".
remove_submenu_page('epl-general', 'epl-contacts');
//Hide "Easy Property Listings → Reports".
remove_submenu_page('epl-general', 'epl-reports');
//Hide "Easy Property Listings → Add Ons".
remove_submenu_page('epl-general', 'epl-addons');
//Hide "Easy Property Listings → Tools".
remove_submenu_page('epl-general', 'epl-tools');
//Hide "Property".
remove_menu_page('edit.php?post_type=property');
//Hide "Property → All Listings".
remove_submenu_page('edit.php?post_type=property', 'edit.php?post_type=property');
//Hide "Property → Add New Listing".
remove_submenu_page('edit.php?post_type=property', 'post-new.php?post_type=property');
//Hide "Property → Suburb".
remove_submenu_page('edit.php?post_type=property', 'edit-tags.php?taxonomy=location&post_type=property');
//Hide "Property → Features".
remove_submenu_page('edit.php?post_type=property', 'edit-tags.php?taxonomy=tax_feature&post_type=property');
}
add_action('admin_menu', 'plt_hide_easy_property_listings_menus', 100);
Where do I put this code?
How to Hide Easy Property Listings Meta Boxes
function plt_hide_easy_property_listings_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Listing Details" meta box.
remove_meta_box('epl-property-listing-section-id', $screen->id, 'normal');
//Hide the "Listing Features" meta box.
remove_meta_box('epl-features-section-id', $screen->id, 'normal');
//Hide the "Additional Features" meta box.
remove_meta_box('epl-additional-features-section-id', $screen->id, 'normal');
//Hide the "Files and Links" meta box.
remove_meta_box('epl-attachments-section-id', $screen->id, 'normal');
//Hide the "Property Address" meta box.
remove_meta_box('epl-property-address-section-id', $screen->id, 'side');
//Hide the "Pricing" meta box.
remove_meta_box('epl-pricing-section-id', $screen->id, 'side');
//Hide the "Linked Contact" meta box.
remove_meta_box('epl-owner-listings-section-id', $screen->id, 'side');
//Hide the "Rural Features" meta box.
remove_meta_box('epl-rural-features-id', $screen->id, 'normal');
//Hide the "Rental Pricing" meta box.
remove_meta_box('epl-property-rent-id', $screen->id, 'side');
//Hide the "Land Details" meta box.
remove_meta_box('epl-features-section-id-single-column', $screen->id, 'normal');
//Hide the "Leasing" meta box.
remove_meta_box('epl-commercial-leasing-id', $screen->id, 'normal');
//Hide the "Commercial Features" meta box.
remove_meta_box('epl-commercial-features-id', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_easy_property_listings_metaboxes', 20);
How to Hide Easy Property Listings Dashboard Widgets
function plt_hide_easy_property_listings_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Listings" widget.
remove_meta_box('epl_status_dashboard_widget', 'dashboard', 'normal');
//Remove the "Easy Property Listings Activities" widget.
remove_meta_box('epl_dashboard_activity_widget', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_easy_property_listings_dashboard_widgets', 20);