/location/

This topic contains 12 replies, has 5 voices, and was last updated by  rosarnach 9 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #21380

    pawon
    Free User
    Post count: 34

    Hi,

    I know the difference within the plugin, between ‘places’ (or ‘businesses’ on my site) and ‘locations’.

    Question 1: What is exactly the purpose of the /location/ page?

    For example
    /location/australia/
    /businesses/australia/

    The /location/australia/ shows me only an empty map.
    There are links to categories within ‘australia’, but they all send me to a /businesses/*/*/* page.

    SO.. what is the purpose of the /location/ page? I only have post-type ‘businesses’ no events, or other post-types (and not planning on).

    I already have /businesses/australia, and /business/any-other-country and /businesses/country/whatever-category/sub-category

    So basically /businesses/*/*/* can take me anywhere I want: country, category, sub-category, a specific business.

    The /location/ confuses me, and my visitors I think.

    question 2:

    The location switcher takes me to /location/chosen-country-name

    Can it be changed to /businesses/country-name (or whatever post-type is used, I use ‘businesses’)? Because I’d like to keep visitors away from the /location/ page.

    It’s probably something custom, but can you at least say it’s possible and point to the part of the code where this is handled the best?

    Thank you!

    Pawon

    #21384

    pawon
    Free User
    Post count: 34

    Hi,

    From another post i know it’s supposed to work like this..

    If you visit /businesses/netherlands/ first, and go to /businesses/ afterwards, it shows all businesses from netherlands only

    This is the way it is supposed to work, if you enter the site in a category or location url that is specific, then your location is set as that so you can see all info from that location.

    But I want to change it, that when you visit /businesses/ that it shows worldwide or ‘all’ businesses. I also think, generally, this would make more sense.

    For example on the demo website:

    http://wpgeo.directory/attractions/united-states/illinois/
    Shows all attractions in Illinois.

    Click on ‘united states’ in the breadcrumbs, it takes you to:
    http://wpgeo.directory/attractions/united-states/
    And it shows all attractions in the united stats.

    Now click on ‘attractions’ in the breadcrumbs and it takes you to:
    http://wpgeo.directory/attractions/

    And it shows you all the attractions of the location you last visited, In this case ‘all locations in united states’.

    I think it would make more sense if the /attractions/ url shows attractions worldwide. It’s the logical ‘next step up’.

    I know it’s supposed to work like this, but I’d like to have it work differently. Where do I change this in the code? Is there a wp filter?

    Thanks

    Pawon

    #21385

    Guust
    Moderator
    Post count: 29970

    Standard GD allows your visitors to navigate either by location or categories. That is why there is the location page, which is the start page for all locations.
    Businesses will narrow by category, so might not work for everyone.
    I’ll ask Stiofan to look at your other question.

    #21414

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I’m not really sure what was not answers here?

    The /attractions/ page showing only the location you are set in is the way we want it to work so will not change, the homepage is the same…

    Stiofan

    #21441

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    the location is set with a session. There is no wp filter (wordpress doesn’t handle locations).

    You would have to rewrite the logics of how sessions are set to accomplish this.

    Thx

    #21468

    pawon
    Free User
    Post count: 34

    Stiofan: you dont need to change it. Just tell me how to change it.

    Paolo: Thanks, that’s what I suspected already. Will investigate the code and make the changes myself.

    Pawon

    #21496

    pawon
    Free User
    Post count: 34

    Hi

    I see most of this is set in custom_taxonomy_hooks_actions.php in function
    geodir_set_location_var_in_session_in_core($wp)

    Can you shine some light on where would be the best place to adapt this function to what I want.

    thanks

    Pawon

    #21498

    pawon
    Free User
    Post count: 34

    I noticed that /location/ (the homepage) does reset the location in session, while /businesses/ doesn’t. I can see in the function where the reset takes place for /location/ but for /businesses/ it’s a little burried..

    Pawon

    #21553

    Paolo
    Site Admin
    Post count: 31206

    Hi Pawon,

    I’ve re-flagged this for Stiofan’s attention. Unfortunately, this is something I’d need his help to do too.

    Thanks

    #21604

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This snippet of code will reset the location to everywhere:

    
    
    unset(	$_SESSION['gd_multi_location'],
    					$_SESSION['gd_city'],
    					$_SESSION['gd_region'],
    					$_SESSION['gd_country'] );

    Stiofan

    #33547

    rosarnach
    Full Member
    Post count: 71

    Siofan, I wish to call a /places/tag URL (ie http://theceliacscene.ca/places/tags/gulf-island/) but have the location reset to everywhere first.

    How should I do that?

    Should I make a separate php file with the following code in it?

    
    
    
    unset(	$_SESSION['gd_multi_location'],
    					$_SESSION['gd_city'],
    					$_SESSION['gd_region'],
    					$_SESSION['gd_country'] );

    Then call the URL?

    David

    #33557

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi David, can you provide a better explanation of how/were you want to call the tag url? Why not hardcode for example?

    Thanks,

    Stiofan

    #33565

    rosarnach
    Full Member
    Post count: 71

    Hi Stiofan.

    I have a test site up at http://www.theceliacscene.ca

    I’m using direct links in my main menu for users to navigate to cities and neighbourhoods directly such as:

    http://theceliacscene.ca/location/canada/british-columbia/victoria/

    I’m also using tags to group some of the places together and direct links to them such as:

    http://theceliacscene.ca/places/tags/vancouver-island/

    The problem is that GeoDirectory remembers that I went to first location link (Victoria) and locks me to that location. When I click on the second tag link http://theceliacscene.ca/places/tags/vancouver-island/ I get no search results as Victoria has no items with the tag “Vancouver Island”.

Viewing 13 posts - 1 through 13 (of 13 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket