Skip to content

Instantly share code, notes, and snippets.

@wplit
Created January 17, 2026 00:21
Show Gist options
  • Select an option

  • Save wplit/f89d03a0545f7451ad3ded397d791862 to your computer and use it in GitHub Desktop.

Select an option

Save wplit/f89d03a0545f7451ad3ded397d791862 to your computer and use it in GitHub Desktop.
add new breadcrunk link to breadcrumbs
<?php
add_filter( 'bricksextras/breadcrumbs/', function( $crumbs ) {
$crumbPosition = 1;
$url = 'https://kevinc366.sg-host.com/tournaments/';
$text = 'Tournaments';
/* if single event, add new breadcrumb */
if ( is_singular('event') ) {
$newCrumb = \BricksExtras\Helpers::breadcrumb_item($url,$text);
array_splice($crumbs, $crumbPosition, 0, $newCrumb);
}
return $crumbs;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment