Results 1 to 9 of 9

Thread: Location filter

  1. #1
    Thread Starter
    Junior Member tomas's Avatar
    Join Date
    May 2009
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Location filter

    The only thing that I lack in 2.9 - location filtering.

    Currently we have ascending and descending filtering of Location name. You may also use search (but it returns the results for the whole site, all categories included).

    I would like to be able to filter the ads according to the Location field. Let's say I am looking for real estate ads at the CityX. I do not want to see any other cities.

    Maybe anyone could give me a hint how to accomplish that?

  2. #2
    Thread Starter
    Junior Member tomas's Avatar
    Join Date
    May 2009
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location filter

    Ok i figured it out myself how to accomplish that.

  3. #3
    Veteran pointandstare's Avatar
    Join Date
    Apr 2009
    Location
    London, England
    Posts
    311
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Location filter

    Do you mind sharing it as it could help others.

  4. #4
    dubya's Avatar
    Join Date
    May 2009
    Location
    Canada
    Posts
    1,000
    Thanks
    115
    Thanked 107 Times in 93 Posts

    Re: Location filter

    Yes, please do share.

    - Dubya
    The search button. Your new best friend.
    - Dubya

  5. #5
    Newbie
    Not a Verified Customer
    psutinrerk's Avatar
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location filter

    Could you please share this,
    I am consider buying classipress, and this feature is very critical for me

    Thanks

  6. #6
    msdomains's Avatar
    Join Date
    May 2009
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location filter

    Yes guys,

    This is an important feature. Please do educate how to use this.

    (I am stretching this a bit) if one can select multiple categories simultaneously it will be great like in MS Excel. Example: I want to view all real estate listing in a particular city, within that particular area, and arrange it by price. Is it possible to do this, or is it expecting too much

  7. #7
    Thread Starter
    Junior Member tomas's Avatar
    Join Date
    May 2009
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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!

  8. #8
    chifen's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    326
    Thanks
    18
    Thanked 13 Times in 12 Posts

    Re: Location filter

    Hi possible to see this live??

  9. #9
    Thread Starter
    Junior Member tomas's Avatar
    Join Date
    May 2009
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Location filter

    Hi,
    Hopefully will have it up soon.

    I will be able to show you this in a few days.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)