I am trying to put a search field with two or three dropdown selections so that they can be like:
dropdown1: Catogory(i.e. City)
dropdown2: subCatogory(i.e. Car make)
search field: any text
so they when a user selects New York, Honda, and put in Civic in search field, it will return the results of all on-sale honda civic in NY region.
There is a post pretty similar to my question but it has been hanging out with no answer, wish I get better luck!
Thank you in advance!!! Any help will be appreciated !!
Well, the more customized solution is to use an ajax call to a funcion in your backend to retrieve the posts you want (actually, you could call a function in your backend synchronously, no need to use ajax, but will be better). This function will take the parameters and query the database (using WP_query for example), then render the posts using a template (search.php maybe).
Another approach is to use filters, explained in the following link.
https://wordpress.stackexchange.com/questions/11822/how-to-limit-search-to-post-titles
Good luck!