Home Breadcrumb take me to wrong page and Popular Places issue

This topic contains 17 replies, has 4 voices, and was last updated by  Giri 8 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #344765

    Michael Storzieri
    Expired Member
    Post count: 27

    Hello, I am trying to integrate GD into an existing Divi Theme website while keeping the Home Page the same as before adding GD, I will want to add GD access by Main menu as I progress.

    For now, I’m having an issue with the “Home Breadcrumb” taking me to the Site’s Root URL, NOT the one I have set it for in “GD Home Page” setting.

    Site URL is: http://successpartnerdna.com/
    “GD Home Page setting” is set to http://successpartnerdna.com/dna-directory/

    Also, when I’m on the http://successpartnerdna.com/dna-directory/ page which shows the default city map with my one Hair Salon Icon but No listing under the map with a heading of “Popular Places” and a “View All” button that when clicked takes me to a page called “All Places” with a URL of http://successpartnerdna.com/places/

    Is that normal I am using GD CPT plugin and the Hair Salon listing is under the CPT of Hair Salons.

    Please Help,
    Mike

    #344767

    Guust
    Moderator
    Post count: 29970

    Hi Mike

    See https://wpgeodirectory.com/docs/basic-installation/#home

    If you want to use one of your normal WordPress pages for the homepage of your website, then select the GD Location page here.

    So you should use Location for the GD Home page, and this is your start page of your directory: http://successpartnerdna.com/location/

    You have only added a Popular Post widget for Places (Reastaurants?).
    You need to change that or add a new one for Hair Salons.
    https://wpgeodirectory.com/docs/widgets/#popular-post

    Hopefully that clears things up. Thanks.

    #345304

    Michael Storzieri
    Expired Member
    Post count: 27

    Thanks, this helps but I am still not sure if the “Home” link in the Breadcrumb should take me to http://successpartnerdna.com/location/ or http://successpartnerdna.com the root URL?

    See Image here: http://www.awesomescreenshot.com/image/2074445/6c9f65be0a8b7c69102dec6adfbf49be

    #345306

    Michael Storzieri
    Expired Member
    Post count: 27
    #345371

    Guust
    Moderator
    Post count: 29970

    “Home” in the breadcrumb is home of the site, not home of the directory.

    #345390

    Michael Storzieri
    Expired Member
    Post count: 27

    Are you telling me that setting GD Home to a URL is not setting the Home being used in the directory?

    Then what is the purpose of setting it at all?

    If I set a Menu to Location and what most people will do with a Breadcrumb will hit home but this will send them to the root home and off the directory.

    Do you see my point?

    Is GD not set up to operate as part of a website just as a standalone directory site?

    #345392

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    the home page is the home page, each website can only have 1. Otherwise the link would say “Directory Home” or something. Not just Home.

    In any case you can modify that Home link with a php snippet, please see: https://wpgeodirectory.com/support/topic/how-to-add-breadcrumb-to-gd-home/#post-251020

    Thanks

    #345395

    Guust
    Moderator
    Post count: 29970

    Most people expect that if they click HOME that they go to the beginning of the website, not the beginning of a section of the site only.
    In other words, if “GD is set up to operate as part of a website”, then it is treated as a part.
    If you want HOME to be both the homepage of your website and the startpage of the directory, then you should use GD Home for both settings.

    I guess what you are after is a breadcrumb like this:
    HOME [website home] > DIRECTORY [location page for all locations] > etc
    That might be possible with some custom code, I’ll check for you.

    #345397

    Guust
    Moderator
    Post count: 29970

    Looks like I am a bit too late 🙂
    Thanks Paolo !

    #345427

    Michael Storzieri
    Expired Member
    Post count: 27

    Yes, that was it I was having the same issue setting our directory up as Ray Scarpa did at the topic you sent me to.

    Code Works great, and yes you can only have one Home Page unless you want a Home Page in a Home page 😉

    I’m happy your here to help.

    Thank you, both

    #345507

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂

    #351487

    Michael Storzieri
    Expired Member
    Post count: 27

    The code is working in most places but when I use the “Switch City Location” from the Multi-location plugin it sets the Breadcrumb to Home > Location where Home is to the Root URL of the site.

    Here is the code snippet I’m using:

    
    
    function modify_breadcrumb_first_item($html) {
        return '<a href="' . home_url() . '/directory/">' . __( 'Directory Home', 'geodirectory' ) . '</a>';
    }
    add_filter('geodir_breadcrumb_first_link', 'modify_breadcrumb_first_item');

    How can I get this to work over the complete directory?

    #352417

    Giri
    Expired Member
    Post count: 3155

    Hi Michael,

    That is expected behaviour for multilocations.

    You can find that settings at Multilocations -> Home page should go to

    geodir_breadcrumb_first_link won’t work in location pages since multilocation addon override the first link. I have just added support for location pages.

    But you may have to wait till next release.

    You can also post your ftp if you want me to apply the patch in your website.

    Thanks

    #352688

    Michael Storzieri
    Expired Member
    Post count: 27
    This reply has been marked as private.
    #352693

    Giri
    Expired Member
    Post count: 3155

    You need to apply the patch in Miltilocations addon. Its a private repo. So i cannot give you the link.

    I totally understand your concern.

    So let me give you the steps to apply the patch.

    File:

    /wp-content/plugins/geodir_location_manager/geodir_location_template_tags.php

    Line number: ~ 56

    Function name: geodir_location_breadcrumb

    Replace this line

    
    
    
    $breadcrumb .= '<li><a href="'.home_url().'">' . __( 'Home', 'geodirlocation' ) . '</a></li>';

    with

    
    
    
    $breadcrumb .= '<li>' . apply_filters( 'geodir_breadcrumb_first_link', '<a href="' . home_url() . '">' . __( 'Home', 'geodirlocation' ) . '</a>' ) . '</li>';

    Final step:

    Make sure Multilocations -> Home page should go to setting NOT set to location.

    Let me know how that goes.

    Thanks

Viewing 15 posts - 1 through 15 (of 18 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