How to add breadcrumb to GD-home
This topic contains 8 replies, has 4 voices, and was last updated by Karin Palle 8 years, 2 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: breadcrumbs
-
AuthorPosts
-
August 20, 2016 at 2:09 am #250150
Hi,
We do like the breadcrumbs and think users appreciate the ability to navigate from listings back to categories, etc. However we are not using the gd-home page as our site home page, so how can we give users access to navigate back to gd-home (directory home page) in the breadcrumbs?
Right now they visit http://www.inmaricopa.com/directory/ which is effectively the renamed version of the original gd-home. Selecting categories or individual listings they can see breadcrumbs at top, like “Home > Listings > Health & Wellness > Fitness” but choosing “Home” takes them to site home page. Even showing the “Listings” option in breadcrumbs is kind of confusing, I think, as selecting that brings them back to an “All Listings” page, which isn’t very useful (all listings, no categories). Optimally, it would be nice to have the breadcrumbs say Home > Directory > Health & Wellness > Fitness in the above example, so that users don’t have to manually find their way back.
Hoping this is possible but would appreciate suggestions if it is not. We can also hide breadcrumbs completely but would prefer to keep them active.
Thanks!
August 20, 2016 at 5:23 pm #250400Hi,
neither thing is possible out of the box. The Home link takes to the website home page, which is correct.
And the listings (cpt) archive is a WordPress default thing.
I know there are hooks to modify the breadcrumb and I’m almost positive one of the developer already provided an example to modify it, but I can’t find the old topic, so I’ve flagged this for him directly.
He’ll be back on Monday and he’ll let us know if there is an easy way to do this.
Thanks for your patience,
August 22, 2016 at 8:53 am #251020You can use this code to change Home breadcrumb item to Directory item.
But keeping both item not possible at the moment.
function modify_breadcrumb_first_item($html) { return '<a href="' . home_url() . '/directory/">' . __( 'Directory', 'geodirectory' ) . '</a>'; } add_filter('geodir_breadcrumb_first_link', 'modify_breadcrumb_first_item');
Use child theme or this plugin to apply the code.
https://wordpress.org/plugins/code-snippets/August 22, 2016 at 11:25 pm #251402Much appreciated! We are using a child theme, wondering if you can confirm which file to edit? Is this code to add to functions.php or somewhere else? Trying to avoid additional plugins if possible. Thanks!
August 23, 2016 at 6:14 am #251530Dropped the above code into the child theme functions.php document and it worked perfectly. Thanks so much!
August 23, 2016 at 6:54 am #251534Ray,
Sorry for the late reply. Our team members are from different timezones. I just got back to work.All our custom codes goes in child theme’s functions.php file unless otherwise specified.
If it doesn’t goes in functions.php file then most likely we will apply the changes on your behalf 99% of the time.
Thanks
September 2, 2016 at 9:39 pm #258681Is there code available for the functions.php file that would let us change where the “View all” link sends people? It would be great if that could be more set to be specific to showing all special offers or feature listings, not all places. Alternatively, could View all be hidden since it is causing some confusion.
September 3, 2016 at 4:11 pm #259051Hi,
If your defaul sort is “featured” it will show featured listings on top. It is not possible to show only special offers though.
you can hide it with css adding this in GD > design > scripts > custom css:
.geodir_list_heading a.geodir-viewall { display: none; }
Thanks
September 5, 2016 at 4:01 pm #260333Thanks. I think I’ll just hide the link. I do have a shortcode set up with the listings that have special offers, but it has the same View All link displayed and people think they’ll get to see all offers. 🙂
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket