Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuadavidnelson/a66766ab44f6ebf5f06b to your computer and use it in GitHub Desktop.
Save joshuadavidnelson/a66766ab44f6ebf5f06b to your computer and use it in GitHub Desktop.
Filter out the "home" from genesis breadcrumbs.
<?php
/**
* Remove the "home" value from the genesis breadcrumbs.
*
* @since 1.0.0
*
* @param array $crumbs
* @param array $args
* @return array
*/
function chelan_breadcrumb_remove_home( $crumbs, $args ) {
// Pull out the first entry
if( isset( $crumbs[0] ) ) {
unset( $crumbs[0] );
// Shift the indexes
$crumbs = array_values( array_filter( $crumbs ) );
}
return $crumbs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment