Last active
December 15, 2015 06:59
-
-
Save chssweb/5220426 to your computer and use it in GitHub Desktop.
Breadcrumbs navxt - http://wordpress.org/extend/plugins/breadcrumb-navxt/
Modifiying the output with its actions
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 | |
/* Original breadcrumb: Home >> Section1 >> SubSection1 >> taxonomy | |
* Becomes: Home >> Section1 >> taxonomy | |
*/ | |
add_action('bcn_after_fill','fix_keyword_breadcrumb'); | |
function fix_keyword_breadcrumb($trail) { | |
if (is_tax( 'keywords')){ | |
unset($trail->trail[1]); | |
$trail->trail = array_values($trail->trail); | |
return $trail; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment