Created
December 17, 2019 20:47
-
-
Save jamesmthornton/7a2008a707a91762b1f850555cdf64ce to your computer and use it in GitHub Desktop.
Remove "Home" link and trailing slash from breadcrumbs in Genesis themes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove "Home" link and trailing slash from breadcrumbs in Genesis themes | |
add_filter( 'genesis_home_crumb', 'remove_home_breadcrumb' ); | |
function remove_home_breadcrumb( $crumb ) { | |
$crumb = ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
genesis_home_crumb hook and get_home_crumb function referenced in /wp-content/themes/genesis/lib/classes/breadcrumb.php
Rewriting $crumb var strips out the Home functionality, which in breadcrumb.php is
$crumb = ( is_home() && is_front_page() ) ? $this->args['home'] : $this->get_breadcrumb_link( $url, '', $this->args['home'] );