Skip to content

Instantly share code, notes, and snippets.

@GaryJones
Created March 24, 2013 21:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save GaryJones/5233669 to your computer and use it in GitHub Desktop.
Save GaryJones/5233669 to your computer and use it in GitHub Desktop.
Remove post title from Genesis breadcrumb (assumed on single.php, so limited possibilities). Completely untested.
<?php
add_filter( 'genesis_single_crumb', 'gj_single_crumb', 10, 2 );
/**
* Remove Post Title from Breadcrumb.
*
* Takes a substring of crumb, starting at 0, with a length of up to the last occurrence of the
* (start of the) separator string.
*/
function gj_single_crumb( $crumb, $args ) {
return substr( $crumb, 0, strrpos( $crumb, $args['sep'] ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment