-
Home
-
Property Hive
- Tips
How to Hide Property Hive Admin Menus
function plt_hide_propertyhive_menus() {
//Hide "Property Hive".
remove_menu_page('propertyhive');
//Hide "Property Hive → Properties".
remove_submenu_page('propertyhive', 'edit.php?post_type=property');
//Hide "Property Hive → Owners Landlords".
remove_submenu_page('propertyhive', 'edit.php?post_type=contact&_contact_type=owner');
//Hide "Property Hive → Applicants".
remove_submenu_page('propertyhive', 'edit.php?post_type=contact&_contact_type=applicant');
//Hide "Property Hive → Third Party Contacts".
remove_submenu_page('propertyhive', 'edit.php?post_type=contact&_contact_type=thirdparty');
//Hide "Property Hive → Enquiries".
remove_submenu_page('propertyhive', 'edit.php?post_type=enquiry');
//Hide "Property Hive → Appraisals".
remove_submenu_page('propertyhive', 'edit.php?post_type=appraisal');
//Hide "Property Hive → Viewings".
remove_submenu_page('propertyhive', 'edit.php?post_type=viewing');
//Hide "Property Hive → Offers".
remove_submenu_page('propertyhive', 'edit.php?post_type=offer');
//Hide "Property Hive → Sales".
remove_submenu_page('propertyhive', 'edit.php?post_type=sale');
//Hide "Property Hive → Tenancies".
remove_submenu_page('propertyhive', 'edit.php?post_type=tenancy');
//Hide "Property Hive → Management".
remove_submenu_page('propertyhive', 'edit.php?post_type=key_date&orderby=date_due&order=asc&status=upcoming_and_overdue&filter_action=Filter');
//Hide "Property Hive → Import PropertiesPRO".
remove_submenu_page('propertyhive', 'ph-import_properties_dummy');
//Hide "Property Hive → Reports".
remove_submenu_page('propertyhive', 'ph-reports');
//Hide "Property Hive → Settings".
remove_submenu_page('propertyhive', 'ph-settings');
}
add_action('admin_menu', 'plt_hide_propertyhive_menus', 100);
Where do I put this code?
How to Hide Property Hive Meta Boxes
function plt_hide_propertyhive_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Property Summary Description" meta box.
remove_meta_box('postexcerpt', $screen->id, 'normal');
//Hide the "Property Address" meta box.
remove_meta_box('propertyhive-property-address', $screen->id, 'normal');
//Hide the "Property Owner / Landlord" meta box.
remove_meta_box('propertyhive-property-owner', $screen->id, 'normal');
//Hide the "Record Details" meta box.
remove_meta_box('propertyhive-property-record-details', $screen->id, 'normal');
//Hide the "Property Location" meta box.
remove_meta_box('propertyhive-property-coordinates', $screen->id, 'normal');
//Hide the "Property Department" meta box.
remove_meta_box('propertyhive-property-department', $screen->id, 'normal');
//Hide the "Residential Sales Details" meta box.
remove_meta_box('propertyhive-property-residential-sales-details', $screen->id, 'normal');
//Hide the "Residential Lettings Details" meta box.
remove_meta_box('propertyhive-property-residential-lettings-details', $screen->id, 'normal');
//Hide the "Residential Details" meta box.
remove_meta_box('propertyhive-property-residential-details', $screen->id, 'normal');
//Hide the "Commercial Details" meta box.
remove_meta_box('propertyhive-property-commercial-details', $screen->id, 'normal');
//Hide the "Utilities & Additional Information" meta box.
remove_meta_box('propertyhive-property-material-information', $screen->id, 'normal');
//Hide the "Property Marketing" meta box.
remove_meta_box('propertyhive-property-marketing', $screen->id, 'normal');
//Hide the "Property Features" meta box.
remove_meta_box('propertyhive-property-features', $screen->id, 'normal');
//Hide the "Property Descriptions" meta box.
remove_meta_box('propertyhive-property-rooms', $screen->id, 'normal');
//Hide the "Property Description" meta box.
remove_meta_box('propertyhive-property-description', $screen->id, 'normal');
//Hide the "Property Photos" meta box.
remove_meta_box('propertyhive-property-photos', $screen->id, 'normal');
//Hide the "Property Floorplans" meta box.
remove_meta_box('propertyhive-property-floorplans', $screen->id, 'normal');
//Hide the "Property Brochures" meta box.
remove_meta_box('propertyhive-property-brochures', $screen->id, 'normal');
//Hide the "Property EPCs" meta box.
remove_meta_box('propertyhive-property-epcs', $screen->id, 'normal');
//Hide the "Property Virtual Tours" meta box.
remove_meta_box('propertyhive-property-virtual-tours', $screen->id, 'normal');
//Hide the "Correspondence Address" meta box.
remove_meta_box('propertyhive-contact-correspondence-address', $screen->id, 'normal');
//Hide the "Contact Details" meta box.
remove_meta_box('propertyhive-contact-contact-details', $screen->id, 'normal');
//Hide the "Contact Solicitor Details" meta box.
remove_meta_box('propertyhive-contact-solicitor', $screen->id, 'normal');
//Hide the "Record Details" meta box.
remove_meta_box('propertyhive-enquiry-record-details', $screen->id, 'normal');
//Hide the "Enquiry Details" meta box.
remove_meta_box('propertyhive-enquiry-details', $screen->id, 'normal');
//Hide the "Event Details" meta box.
remove_meta_box('propertyhive-appraisal-event', $screen->id, 'normal');
//Hide the "Property Owner Details" meta box.
remove_meta_box('propertyhive-appraisal-property-owner', $screen->id, 'normal');
//Hide the "Property Details" meta box.
remove_meta_box('propertyhive-appraisal-property', $screen->id, 'normal');
//Hide the "Event Details" meta box.
remove_meta_box('propertyhive-viewing-event', $screen->id, 'normal');
//Hide the "Applicant Details" meta box.
remove_meta_box('propertyhive-viewing-applicant', $screen->id, 'normal');
//Hide the "Property Details" meta box.
remove_meta_box('propertyhive-viewing-property', $screen->id, 'normal');
//Hide the "Offer Details" meta box.
remove_meta_box('propertyhive-offer-details', $screen->id, 'normal');
//Hide the "Property Details" meta box.
remove_meta_box('propertyhive-offer-property', $screen->id, 'normal');
//Hide the "Property Owner Solicitor Details" meta box.
remove_meta_box('propertyhive-offer-property-owner-solicitor', $screen->id, 'normal');
//Hide the "Applicant Details" meta box.
remove_meta_box('propertyhive-offer-applicant', $screen->id, 'normal');
//Hide the "Applicant Solicitor Details" meta box.
remove_meta_box('propertyhive-offer-applicant-solicitor', $screen->id, 'normal');
//Hide the "Sale Details" meta box.
remove_meta_box('propertyhive-sale-details', $screen->id, 'normal');
//Hide the "Property Details" meta box.
remove_meta_box('propertyhive-sale-property', $screen->id, 'normal');
//Hide the "Property Owner Solicitor Details" meta box.
remove_meta_box('propertyhive-sale-property-owner-solicitor', $screen->id, 'normal');
//Hide the "Applicant Details" meta box.
remove_meta_box('propertyhive-sale-applicant', $screen->id, 'normal');
//Hide the "Applicant Solicitor Details" meta box.
remove_meta_box('propertyhive-sale-applicant-solicitor', $screen->id, 'normal');
//Hide the "Tenancy Details" meta box.
remove_meta_box('propertyhive-tenancy-details', $screen->id, 'normal');
//Hide the "Property" meta box.
remove_meta_box('propertyhive-tenancy-property', $screen->id, 'normal');
//Hide the "Tenants" meta box.
remove_meta_box('propertyhive-tenancy-applicant', $screen->id, 'normal');
//Hide the "Deposit Scheme Details" meta box.
remove_meta_box('propertyhive-tenancy-deposit-scheme', $screen->id, 'normal');
//Hide the "Management Details" meta box.
remove_meta_box('propertyhive-tenancy-management', $screen->id, 'normal');
//Hide the "Management Dates" meta box.
remove_meta_box('propertyhive-management-dates', $screen->id, 'normal');
//Hide the "Meter Readings" meta box.
remove_meta_box('propertyhive-tenancy-meter-readings', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_propertyhive_metaboxes', 20);
How to Hide Property Hive Dashboard Widgets
function plt_hide_propertyhive_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Property Hive News" widget.
remove_meta_box('propertyhive_dashboard_news', 'dashboard', 'normal');
//Remove the "Viewings Awaiting Applicant Feedback" widget.
remove_meta_box('propertyhive_dashboard_viewings_awaiting_applicant_feedback', 'dashboard', 'normal');
//Remove the "My Upcoming Appointments" widget.
remove_meta_box('propertyhive_dashboard_my_upcoming_appointments', 'dashboard', 'normal');
//Remove the "Upcoming/Overdue Key Dates" widget.
remove_meta_box('propertyhive_dashboard_upcoming_overdue_key_dates', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_propertyhive_dashboard_widgets', 20);