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.
This page may be of interest to you: http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query Maybe this plugin also: http://wordpress.org/extend/plugins/get-custom-field-values/