Need help getting my search page to work correctly I have a dropdown that works correctly, but the can't get the hierarchy to work. Here is my code for my search form "property-search.php"
<?php
$properties = get_posts(array('post_type' => 'property', 'post_status' => 'publish', 'hierarchical' => 1 ));
?>
<form method="get" action="<?php echo home_url( '/' ); ?>">
<select name="location" id="search-location" class="text<?php echo $select_wide; ?>">
<option value=""><?php _e('Location', TS_DOMAIN); ?>…</option>
<?php
$ts_locations = apply_filters('ts_search_location_terms', get_terms('location', array('hide_empty' => true)) );
foreach($ts_locations as $ts_location) {
echo '<option value="'.$ts_location->slug.'"'.selected($ts_location->slug, $search_get['location'], false).'>'.$ts_location->name.'</option>';
}
?>
</select>
<input type="submit" class="left" value="Search" />
</form>
I would like to add a search of custom fields too, but not the most important now. You can see the form here http://dev.scottcarlton.net/listings
Any help would be great! Thanks!