Community Forums › Forums › Archived Forums › Design Tips and Tricks › Breadcrumb appearing twice after upgrading to latest version of Genesis
Tagged: breadcrumbs
- This topic has 4 replies, 2 voices, and was last updated 8 years, 3 months ago by
justcurious.
-
AuthorPosts
-
January 1, 2017 at 9:58 am #198546
justcurious
MemberI have been using Genesis for a few years without upgrading, but was finally forced by WordPress 4.7. Surprisingly I have had very few problems, but my one remaining issue is that the breadcrumb is now appearing twice on date archives. It is working properly on category, author, tag, etc. You can see the problem here:
http://www.nstperfume.com/2016/
I would like the second breadcrumb to go away. Here is what is in my functions.php file, adapted I think from a piece of code by Bill Erickson:
add_filter('genesis_home_crumb', '__return_false'); add_filter( 'genesis_breadcrumb_args', 'sp_breadcrumb_args' ); function sp_breadcrumb_args( $args ) { $args['home'] = 'Home'; $args['sep'] = ' / '; $args['list_sep'] = ', '; // Genesis 1.5 and later $args['prefix'] = '<div class="breadcrumb">'; $args['suffix'] = '</div>'; $args['heirarchial_attachments'] = true; // Genesis 1.5 and later $args['heirarchial_categories'] = true; // Genesis 1.5 and later $args['display'] = true; $args['labels']['prefix'] = ''; $args['labels']['author'] = 'Browsing by author: '; $args['labels']['category'] = 'Browsing by category: '; // Genesis 1.6 and later $args['labels']['tag'] = 'Browsing by tag: '; $args['labels']['date'] = 'Browsing by date: '; $args['labels']['search'] = 'Search for '; $args['labels']['tax'] = 'Archives for: '; $args['labels']['post_type'] = 'Archives for '; $args['labels']['404'] = 'Not found: '; // Genesis 1.5 and later return $args; }
Many thanks for any help!
http://www.nstperfume.com/January 1, 2017 at 10:33 am #198547Victor Font
ModeratorAll I see is one Browsing by Date: 2016. It's also showing once when I view that page source code. Perhaps you're experiencing a caching issue?
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?January 1, 2017 at 11:15 am #198558justcurious
MemberThank you so much Victor! That is weird, I have emptied the page caches and tried on several devices/browsers. Here is what I see in the page source code:
<div class="breadcrumb"><span class="breadcrumb-link-wrap" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="http://www.nstperfume.com/2016/" itemprop="item"><span itemprop="name">2016</span></a></span> / Browsing by date: December 2016</div><div class="archive-description date-archive-description archive-date"><h1 class="archive-title">Archives for December 2016</h1></div>
It's that redundant "Archives for December 2016" that I don't want to appear (and it didn't used to be there, and still does not appear for other breadcrumb types), but you're not seeing it at all?
January 1, 2017 at 11:51 am #198562Victor Font
ModeratorArchives for December 2016 is not part of the breadcrumb. It is the archive description. It's a different element. Try this in functions.php:
remove_action( 'genesis_before_loop', 'genesis_do_date_archive_title' );
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?January 1, 2017 at 12:26 pm #198564justcurious
MemberPerfect, thank you so much Victor and a happy 2017 to you!
-
AuthorPosts
- The topic ‘Breadcrumb appearing twice after upgrading to latest version of Genesis’ is closed to new replies.