• Heya,

    I’ve got a custom post type called “Offers”, with three custom taxonomies: “State”, “City” and “Categories”. I need to allow users to search these “Offers” by selecting a state, then a city and optionally a category but I’m not finding much documentation on how to accomplish this. Can anyone provide an example or a link to a Codex article?

    Thank you!

    Here is my current code:

    <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
    
    	<input type="hidden" name="post_type" value="offers" />
    
    	<select name="state-and-cities">
    		<option value="Oregon">Oregon</option>
    		<option value="Washington">Washington</option>
    	</select>
    
    	<select name="offer-categories">
    		<option></option>
    		<option value="Auto">Auto</option>
    		<option value="Business">Business</option>
    	</select>
    	<input type="submit" id="searchsubmit" value="Search Help" />
    
    </form>
  • The topic ‘Custom Search for Custom Post Types and Taxonimies’ is closed to new replies.