breadcrumbspress_builder_for_taxonomy_term_{$taxonomy}
This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!
Definition
Arguments
Returns
Filters the breadcrumb trail built for a term archive for a specific taxonomy.
This hook is used when building the current-request trail. It is not a universal filter for trails generated directly for a specific post or term. The current generator caches a nonempty result for the request. Replace {$taxonomy} with the actual taxonomy name. The generic filter runs first; this taxonomy-specific filter follows it.
Example
This example registers a callback for the concrete hook name shown; replace the suffix for your own context.
add_filter( 'breadcrumbspress_builder_for_taxonomy_term_category', function( $breadcrumbs, $term_id ) {
if ( isset( $breadcrumbs['home'] ) ) {
$breadcrumbs['home']->title = 'Start';
}
return $breadcrumbs;
}, 10, 2 );