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 Ticket
  • Author
    Posts
  • #33465

    commint
    Free User
    Post count: 19

    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-Captcha

    And these WP plugins:
    Black Studio TinyMCE Widget
    Contact Form 7
    Flamingo
    EWWW Image Optimizer
    WordPress SEO (Yoast)
    WordPress Zero Spam

    #33467

    commint
    Free User
    Post count: 19
    This reply has been marked as private.
    #33472

    Guust
    Moderator
    Post count: 29970

    If 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.

    #33480

    commint
    Free User
    Post count: 19

    Hi 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.

    #33489

    Guust
    Moderator
    Post count: 29970

    You 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.

    #33490

    Guust
    Moderator
    Post count: 29970
    This reply has been marked as private.
    #33536

    commint
    Free User
    Post count: 19

    Hi 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.

    #33546

    commint
    Free User
    Post count: 19

    I’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 town

    I 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.

    #33582

    commint
    Free User
    Post count: 19

    I 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'] );
    #33596

    Guust
    Moderator
    Post count: 29970

    You 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.

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

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount