How to let users choose where to search for posts?
I solved my problems using this simple plugin: http://www.don-benjamin.co.uk/tag/custom-search/
I solved my problems using this simple plugin: http://www.don-benjamin.co.uk/tag/custom-search/
I’ve found that passing post_type doesn’t restrict searches to that type, but just adds that type to the array it already searches. What you can do to build complex search queries is hook pre_get_posts and do a little query manipulation. For a simple example, first I add my own query var to pass to WordPress’s … Read more
If you don’t want to search custom post types at all, you can add ‘exclude_from_search’ => true to your registration args.
filter search custom field query
filter custom field values $min $max
Search Function on a plugin WordPress User
dropdowboxes with pre-selected custom fields optios that filters the results according seach needs
A colleague of mine gave me this helpful answer, I hope it helps others: “To answer definitively, I would need to see a bit more code. Nonetheless, WordPress does override $_REQUEST, so depending on where this code is placed, it may be overwritten. So assuming that the parameter is being passed in the URL, I … Read more
Exclude image titles from search results
The reason you are losing your filters is because you are passing them through POST in the forms. This is fine, but you will have to store these values somehow for the pagination. I believe if you used GET, you may retain the values on “page 2”, but any POST values are lost as soon … Read more