Get Posts that comes under a category as well as a custom field

Discussion in 'WordPress' started by vrktech, Aug 31, 2009.

  1. #1
    I want to know how to get posts that is under a specific category with a custom filed value.

    for example: a post hello world is under Cat1 and has a custom value like country = USA

    people may browse either way like homepage, homepage/category/Cat1, The default custom value country will be empty and when the user selects a country it is stored in a session variable then the page loads with the filtered result.

    I want it to work even if the country is not set or a category is not set. I am stuck with this. Please anyone help me to write query.
     
    vrktech, Aug 31, 2009 IP
  2. myp

    myp Well-Known Member

    Messages:
    1,281
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    140