I'm trying to understand how Wordpress search works. I haven't found much info on the Codex. Arguably, search is not the best WP feature. Even Wordpress.org uses Google Search.
I would like to make a custom search form to allow people search using my custom taxonomies and custom meta fields.
I'd imagine the search query would work exactly as a normal WP query, therefore a tax query and a meta query should be possible.
But how to pass the user submitted form data to a search query?
Is it possible to pass form variables to the /?s= search string in the address bar? that would make things easier...
I know there are many plugins around. Some of them quite complex. But I don't mind learning my own way and eventually the few I tried would require some adaptation for my theme (which uses almost ten different post types and a bunch of custom taxonomies, plus loads of custom fields handled by Advanced Custom Fields plugin).
Is there any detailed article that goes in depth regarding this matter?
I just came up with an idea, to make a form in one page, then pass the input fields variables with $GET to another page template which holds a custom WP_Query and with some IFs and ELSEs perform a custom query... Eventually I will post an answer with the code when I'm done. This is close to what I was asking, although I wanted to know if it was possible without creating a new template with a new query, oh well...