WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am making a theme for a hotel, and I need to be able to provide functionality to search by the following custom fields: Location and Price. I need to be able to query them from the query string itself... ie:




I have found many different questions/answers to this, but none of them seem to specifically address my issue.

This one, notably, I believe is really close to solving the issue for me: Query posts and filter at query time by value of custom meta

It doesn't make much sense to me. I am used to PHP, however I am new to WordPress as a CMS.

share|improve this question

I managed to figure it out (finally) after about 12 hours of screwing around.

The answer here gave me 98% of the answer, and the rest was simply using the appropriate hooks to modify it for my use and to include the postmeta table.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.