Skip to content

Instantly share code, notes, and snippets.

@g-maclean
Created January 27, 2026 07:18
Show Gist options
  • Select an option

  • Save g-maclean/5e3b8d9169e1af74bcdd1b0fd870c020 to your computer and use it in GitHub Desktop.

Select an option

Save g-maclean/5e3b8d9169e1af74bcdd1b0fd870c020 to your computer and use it in GitHub Desktop.
Property Hive - Search Form - Only display specific property types
add_filter( 'propertyhive_form_taxonomy_terms_args', 'custom_form_taxonomy_terms_args', 10, 2 );
function custom_form_taxonomy_terms_args( $args, $field ) {
if ( $field['type'] == 'property_type' ) {
$args['include'] = array( 1, 2, 3 ); // Replace with your desired term IDs from Property Hive -> Settings -> Custom Fields -> Residential Property Types
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment