0

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:

yoursite.com/?post_type=rooms&location=south

yoursite.com/?post_type=rooms&price=20.95

yoursite.com/?post_type=rooms&location=north&price=35

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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