-
Hi
My breadcrumbs look this this
Home > One > Two > Three > Four
I would like to remove One and Two, which I have done as follows:
add_filter( ‘rank_math/frontend/breadcrumb/items’, function( $crumbs, $class ) {
$crumbs[1] = null;
return $crumbs;
}, 10, 2);add_filter( ‘rank_math/frontend/breadcrumb/items’, function( $crumbs, $class ) {
$crumbs[2] = null;
return $crumbs;
}, 10, 2);However, this leaves the breadcrumbs looking like this:
Home > > > Three > Four
Is there a filter I can use to remove the redundant separators?
Thank you
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
You must be logged in to reply to this ticket.