Breadcrumb shows same location for different cities
This topic contains 9 replies, has 2 voices, and was last updated by Guust 9 years, 9 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: breadcrumbs, multilocation
-
AuthorPosts
-
March 9, 2015 at 9:36 pm #33465
Hi all,
I wasn’t sure which forum to post my problem in as I’m not sure exactly what is causing it to happen. Basically, the city shown in the breadcrumb navigation is the same for all places, even when they are in different cities. In addition, my place category permalinks also contain the slug of this same persistent city.
I’m using WP 4.1.1 and all of my plugins are up to date. I am using these WPGD add-ons:
GeoDirectory Ajax Duplicate Alert
GeoDirectory Claim Manager
GeoDirectory Custom Post Types
GeoDirectory Location Manager
GeoDirectory Payment Manager
GeoDirectory Re-CaptchaAnd these WP plugins:
Black Studio TinyMCE Widget
Contact Form 7
Flamingo
EWWW Image Optimizer
WordPress SEO (Yoast)
WordPress Zero SpamMarch 9, 2015 at 9:39 pm #33467This reply has been marked as private.March 9, 2015 at 9:58 pm #33472If using multi countries or multi regions, you cannot use “Add city slug in listing urls” at GD > permalinks.
Because there might be a city with the same name in two regions for eexample.
I changed that for you. Let us know if that fixes your issue.March 9, 2015 at 11:01 pm #33480Hi Guust,
Thanks for the swift response. That helped the breadcrumb situation but now my tags and category archives are empty. I’ve tried regenerating permalinks, clearing cache and resyncing tags/categories and virtual pages from GD Tools.
Can I use location city slugs in my permalinks if I use a default region and default country? My directory will only cover one region and having the location in the permalink is a big plus for SEO.
When I switch that option back on the persistent city reappears in my breadcrumbs. Switching this option off removes locations from the breadcrumb/permalinks anyway so I’m not sure it actually addresses the problem. By the way, I have place tags that have the same name as some of my cities.
March 10, 2015 at 1:15 am #33489You can use location slugs in your URLs at any time, but the option to only use city can only be used when you set GD to only use default country and region at GD > multilocation > settings.
Your category pages seem fine to me.
March 10, 2015 at 1:16 am #33490This reply has been marked as private.March 10, 2015 at 2:59 pm #33536Hi Guust,
Thanks for the info. I continue to have problems when I use Firefox, but switching to another browser or computer fixes the problem. My issue is too localized. It is probably a cache problem. I do now have the permalink structure that I prefer. Thank you.
March 10, 2015 at 4:22 pm #33546I’ve been able to recreate the “problem” which I now think is a feature.
1. Navigate to a listing on the site
2. Click on the city in the breadcrumb nav
3. This city gets stuck in the permalinks and then filters the categories by that townI tried it on your demo site and I saw that the city (Philadelphia) became the user city selection. Therefore I am presuming that by clicking the city link in my breadcrumbs I am setting my base city without realizing it.
I am using one default region and country and I am using city slugs in my permalinks. I am not showing the location switcher in menu and I do not request location info when the user first visits the site.
I understand why this might be the default behaviour, but is it possible to override it, or to drop all reference to cities in the category queries? I can bypass the city pages using redirects.
March 10, 2015 at 8:10 pm #33582I figured out how to override the location setter that activates when you click on a city link in the breadcrumb navigation. This is obviously not what 99% of people will want to do, but in my case I never want the user to choose a location, even by accident. The user location information is held in a session, so you just need to unset the relevant variables. When I clicked on a city in the breadcrumb, the session was being created and interfering with my own expected experience.
// override multilocation setter unset( $_SESSION['gd_multi_location'] ); unset( $_SESSION['gd_country'] ); unset( $_SESSION['gd_region'] ); unset( $_SESSION['gd_city'] );
March 10, 2015 at 10:01 pm #33596You are probably also interested in these links:
https://wpgeodirectory.com/support/topic/dont-save-location-in-coockie/
http://docs.wpgeodirectory.com/faqs/how-can-i-clear-geo-location-settings/We’ve set this to resolved, but let us know if there is anything else.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket