CPT Search Form with Taxonomy filter & Or

I think you can do it in two following steps: In HTML code just add a dropdown with the values you need. <select name=”yourselect”><option value=”1″>Value 1</option> … </select> In your pre_get_posts filter add tax_query parameter like this if( !empty( $_GET[‘yourselect’] ) ) { $query->set(‘tax_query’, array( array( ‘taxonomy’ => ‘YOUR_TAXONOMY_NAME’, ‘field’ => ‘id’, // or slug … Read more

Search result by range?

If you save the the price in a meta field, you can query posts using meta_query: <?php $the_posts = new WP_Query( array( ‘meta_key’ => ‘price’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, ‘meta_query’ => array( array( ‘key’ => ‘price’, ‘value’ => ‘100’, ‘type’ => ‘NUMERIC’, ‘compare’ => ‘>=’ ) ) )); ?> <?php while ( $the_posts->have_posts() … Read more

Combine internal search with Google custom search?

The standard search results can also be formatted with a theme file, by default search.php. You don’t need to create a “fake” page for that. If you don’t include any content from the page, and only use the theme file, you can just rename searchpage.php to search.php and it will work. If you do have … Read more

Help with multiple dropdown tags search

Does your theme have a search.php to display the results? And if not then create one based on the codex examples or default theme or post the source to your index.php for troubleshooting. Edit: Your search.php is difficult to debug, try following the structure of a default theme, and put something like this in your … Read more

CPT Meta Searching

The code you found modifies the main query on pre_get_posts and unsets the search terms so WP_Query doesn’t run a real search query. What you want is // Filter the search SQL that is used in the WHERE clause of WP_Query. apply_filters_ref_array( ‘posts_search’, array( $search, &$this ) ); which runs previously in WP_Query::get_posts(). This later … Read more

Replace default WordPress search behavior with Sphinx

The Sphinx Search website lists three wordpress plugins on its Plugin Page. Maybe one (or more) of them does what you want? Voce Connect. WordPress Plugin. Ivinco. WordPress Plugin. Gigaom. WordPress Plugin. Filters WordPress’ core WP Query to allow interoperability with and improve performance of other plugins and existing queries, including core taxonomy queries.

Need to do blank search.

You can pass s=%20 as your search string, but thats kinda hackish. If what you are trying to achieve is to use your search.php template but with “controled” search results, consider using this: <?php global $query_string; // fetch query string being used query_posts($query_string . ‘&posts_per_page=20’) // add your terms to it. ?>