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

Can somebody point me in the right direction wouldnt have a clue how to start programming this.

I want to filter post based on price (custom value) thru a widget. So lets say you click on a post category you get a list of all the posts in that category, but then I want to give the user the option to filter on price. Been searching for a widget that does this but havent found one.

share|improve this question
Do you want to sort the items based on price or just exclude ones that don't fit the criteria? – fdsa Jul 14 '12 at 22:54
excluse those that dont fit the criteria, like once you go to a certain product category then you can filter on price, color, whatever all custom field value – Bram Jul 15 '12 at 0:41

To search through the category, I think you would want to use get_posts to fetch all the posts in the particular category and then go through them with a for loop and check the custom value in each one and then echo the appropriate items to a results page.

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.