-
I have a custom post type called Campgrounds and taxonomy with City/State.
On my archive pages, it’s fine: removed
However, on the custom taxonomy pages, it only shows Campgrounds -> Hardrick Creek
removedHow can I get the campground single pages breadcrumb to be like Camprounds->Alabama->Abbeville->Hardridge Creek
I’m using this code below:
add_filter( ‘rank_math/frontend/breadcrumb/items’, function( $crumbs, $class ) {
if(is_singular(‘campgrounds’)){
$modifiedCrumb = array(
“0” => esc_html(‘Campgrounds’),
“1” => esc_url(‘/campgrounds/’),
“hide_in_schema” => false
);
$crumbs[count($crumbs)-2] = $modifiedCrumb;
}
var_dump($crumbs); //view breadcrumb structure.
// And return the breadcrumbs
return $crumbs;
}, 10, 2);
The ticket ‘Customized Breadcrumbs’ is closed to new replies.