Created
January 27, 2026 07:18
-
-
Save g-maclean/5e3b8d9169e1af74bcdd1b0fd870c020 to your computer and use it in GitHub Desktop.
Property Hive - Search Form - Only display specific property types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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