Skip to content

Instantly share code, notes, and snippets.

@g-maclean
Created August 5, 2025 13:00
Show Gist options
  • Save g-maclean/29a8b3caa890aa790a87934d7ca3f623 to your computer and use it in GitHub Desktop.
Save g-maclean/29a8b3caa890aa790a87934d7ca3f623 to your computer and use it in GitHub Desktop.
PropertyHive - Remove office and location from reg form
add_filter( 'propertyhive_applicant_registration_form_fields', 'remove_location_and_hide_office_id', 10, 1 );
function remove_location_and_hide_office_id( $form_controls ) {
// Remove 'location' from the form controls
if ( isset($form_controls['location']) ) {
unset($form_controls['location']);
}
// Hide 'office_id' from the form controls
if ( isset($form_controls['office_id']) ) {
$form_controls['office_id']['type'] = 'hidden';
$form_controls['office_id']['value'] = '';
}
return $form_controls;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment