Support » Fixing WordPress » Custom Search of Custom Types and Fields

  • 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”

    $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>
        				$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>';
    <input type="submit" class="left" value="Search" />

    I would like to add a search of custom fields too, but not the most important now. You can see the form here

    Any help would be great! Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Search of Custom Types and Fields’ is closed to new replies.