Created
October 17, 2017 16:44
-
-
Save itsnahidhasan/a86d7b53d4d6b495a8c0a419c3edecc7 to your computer and use it in GitHub Desktop.
Genesis Breadcrumb Code Snippets
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
/** | |
* 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 be_remove_title_from_single_crumb( $crumb, $args ) { | |
return substr( $crumb, 0, strrpos( $crumb, $args['sep'] ) ); | |
} | |
add_filter( 'genesis_single_crumb', 'be_remove_title_from_single_crumb', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment