-
I’ve created custom post types using jetengine plugin, for ‘products’. But would like for the breadcrumbs to not include the name of the custom post type, where it uses the singular name of the type (produkt). Instead I would like for the breadcrumbs to be like this: ‘Home’ – ‘parent category(ies) – ‘category’ – ‘title of product’ as it is with regular posts (they don’t start with ‘post’)
Now the pages with custom post types have breadcrumbs like this: ‘home’ – ‘custom post type name’ – ‘parent category(ies) – etc etc.
How can i change this? Tried adding this code to the function.php but it didn’t work..add_filter( ‘rank_math/frontend/breadcrumb/items’, function( $crumbs, $class ) {
if (get_post_type() === ‘CPT Name’) {
unset($crumbs[1]);
return $crumbs;
}
return $crumbs;
}, 10, 2);Here is link to post type page with breadcrumbs: http://staging.port-service.no/produkter/privat/garasjeporter/
You must be logged in to reply to this ticket.