Re: Location filter
Fellows,
I will try to post it as soon as I finish it. Actually it's a very easy thing to do.
Just a quick hint for those, who know php and
WP basics:
Create a drop down list with values you would like to have filter (including onchange
JS function):
for instance CityX, CityY, CityX2 etc.
When you change the value of the dropdown list, it will post some $_GET parameters to your url (the same happens when you use sort ASC/DSC).
Catch those $_GET parameters.
if(!empty($_GET['sort']))
{
$orderby=trim($_GET['sort']);
$order=trim($_GET['order']);
$key=trim($_GET['key']);
$meta_key=trim($_GET['meta_key']);
$meta_value=trim($_GET['meta_value']);
// create the sort by injection
$posts = query_posts($query_string . '&orderby='.$orderby.'&meta_key='.$key.'&order='.$ order.'&meta_key='.$meta_key.'&meta_value='.$meta_ value.'');
}
That's it!
If you have any questions, I will try to do my best to answer.
Sorry for the late reply, I am digging in for launching a new classifieds system on classipress!