Skip to content

Instantly share code, notes, and snippets.

@JoeHana
Created June 17, 2014 20:22
Show Gist options
  • Save JoeHana/9176eca0cd16272cb155 to your computer and use it in GitHub Desktop.
Save JoeHana/9176eca0cd16272cb155 to your computer and use it in GitHub Desktop.
<?php
/**
* Only top level locations
* in search form
*/
add_filter( 'wpsight_search_form_details', 'custom_search_form_details', 100 );
function custom_search_form_details( $details ) {
$details['location']['data'] = get_terms( 'location', array( 'orderby' => 'name', 'hide_empty' => true, 'parent' => 0, 'hierarchical' => false ) );
return $details;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment