Filter: bricks/breadcrumbs/items
Filters the array of breadcrumb items (HTML strings) before they are rendered in the Breadcrumbs element. This allows you to add, remove, or modify specific breadcrumb links.
Parameters
Section titled “Parameters”$breadcrumb_items(array): Array of HTML strings, where each string represents a breadcrumb item (e.g., a link or current page span).
Example usage
Section titled “Example usage”add_filter( 'bricks/breadcrumbs/items', function( $breadcrumb_items ) { // Example: Add a custom item after the Home link (assuming Home is the first item) $custom_item = '<a href="/custom-link/">Custom Link</a>'; array_splice( $breadcrumb_items, 1, 0, $custom_item );
return $breadcrumb_items;} );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Thanks for sharing feedback. We're using it to improve these docs.