Display posts if a custom field value is equal to another custom field value

There’s some contradiction between your question and the code you provided, so I’m not exactly sure which of two scenarios you’re dealing with. Scenario 1 – You want to show all Shops with a specific value for shop-id and all Restaurants with the same specific value for restaurant-id. Let’s say that value is 20. You … 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