/location/
This topic contains 12 replies, has 5 voices, and was last updated by rosarnach 9 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: everywhere, tag
-
AuthorPosts
-
November 13, 2014 at 12:41 pm #21380
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
November 13, 2014 at 12:55 pm #21384Hi,
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
November 13, 2014 at 12:59 pm #21385Standard 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.November 13, 2014 at 3:52 pm #21414I’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
November 13, 2014 at 6:13 pm #21441Hi,
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
November 14, 2014 at 12:01 am #21468Stiofan: 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
November 14, 2014 at 10:27 am #21496Hi
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
November 14, 2014 at 10:35 am #21498I 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
November 14, 2014 at 7:17 pm #21553Hi Pawon,
I’ve re-flagged this for Stiofan’s attention. Unfortunately, this is something I’d need his help to do too.
Thanks
November 15, 2014 at 9:12 am #21604This snippet of code will reset the location to everywhere:
unset( $_SESSION['gd_multi_location'], $_SESSION['gd_city'], $_SESSION['gd_region'], $_SESSION['gd_country'] );
Stiofan
March 10, 2015 at 5:18 pm #33547Siofan, 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
March 10, 2015 at 6:34 pm #33557Hi David, can you provide a better explanation of how/were you want to call the tag url? Why not hardcode for example?
Thanks,
Stiofan
March 10, 2015 at 6:46 pm #33565Hi 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”.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket