-
-
Save g-kanoufi/3b633450c95d7f2df190 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
//* Do NOT include the opening php tag | |
//* Modify Home breadcrumb link. | |
add_filter ( 'genesis_home_crumb', 'sp_breadcrumb_home_link' ); // Genesis >= 1.5 | |
add_filter ( 'genesis_breadcrumb_homelink', 'sp_breadcrumb_home_link' ); // Genesis =< 1.4.1 | |
function sp_breadcrumb_home_link( $crumb ) { | |
return preg_replace('/href="[^"]*"/', 'href="http://example.com/home"', $crumb); | |
} |
This file contains hidden or 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 | |
//* Do NOT include the opening php tag | |
//* Modify breadcrumb arguments. | |
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['hierarchial_attachments'] = true; // Genesis 1.5 and later | |
$args['hierarchial_categories'] = true; // Genesis 1.5 and later | |
$args['display'] = true; | |
$args['labels']['prefix'] = 'You are here: '; | |
$args['labels']['author'] = 'Archives for '; | |
$args['labels']['category'] = 'Archives for '; // Genesis 1.6 and later | |
$args['labels']['tag'] = 'Archives for '; | |
$args['labels']['date'] = 'Archives for '; | |
$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; | |
} |
This file contains hidden or 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 | |
//* Do NOT include the opening php tag | |
//* Reposition the breadcrumbs | |
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); | |
add_action( 'genesis_after_header', 'genesis_do_breadcrumbs' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment