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-
AuthorPosts
-
January 17, 2017 at 9:51 pm #344765
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,
MikeJanuary 17, 2017 at 10:02 pm #344767Hi 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-postHopefully that clears things up. Thanks.
January 18, 2017 at 8:31 pm #345304Thanks, 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
January 18, 2017 at 8:40 pm #345306This shows the Home button I am talking about:
http://www.awesomescreenshot.com/image/2074508/283c49f2939d8cce2955a769968bfcde
January 18, 2017 at 10:11 pm #345371“Home” in the breadcrumb is home of the site, not home of the directory.
January 18, 2017 at 10:29 pm #345390Are 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?
January 18, 2017 at 10:38 pm #345392Hi,
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
January 18, 2017 at 10:43 pm #345395Most 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.January 18, 2017 at 10:44 pm #345397Looks like I am a bit too late 🙂
Thanks Paolo !January 19, 2017 at 12:24 am #345427Yes, 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
January 19, 2017 at 3:47 am #345507You’re welcome 🙂
January 29, 2017 at 3:23 am #351487The 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?
January 31, 2017 at 10:22 am #352417Hi 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
January 31, 2017 at 4:32 pm #352688This reply has been marked as private.January 31, 2017 at 4:40 pm #352693You 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
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket