Creating search filter through plugin

You can add more than one filter call, so each of your custom meta_key‘s can be handled in separate code and when executed will cumulatively adjust the query. Perhaps look at the pre_get_posts filter rather than parse_query (although the solution I’m suggesting could possibly work in either case). pre_get_posts gives you access to the current … Read more

Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query

SOLUTION: I will post my solution and explain what was the problem and I hope that this post can help someone in the future. As we talk in the small comments the problem, was that I was sending a non existing taxonomy by error and this was causing the AND (0=1). To fix the whole … Read more