I’ve searched google, asked Chat GPT-4 and cannot find a solution to remove title from genesis breadcrumbs on product page. My temporary fix is:
/*temporary fix removing title from breadcrumbs on product pages*/
.product-template-default .breadcrumb {
white-space: nowrap;
overflow: hidden;
}
.product-template-default .breadcrumb>span:last-of-type:before {
content: ‘ ‘;
width: 9999px;
display: inline-block;
}
Firstly I tried removing it modyfing functions.php file, by using preg\_replace function, but it seems I cannot get access to breadcrumbs string to modify it. My hopeless trials looked like this:
add_filter( ‘genesis_page_crumb’, ‘custom_remove_product_title_from_breadcrumbs’, 10, 2 );
function custom_remove_product_title_from_breadcrumbs( $crumb, $args ){
if (is_product()) {
return preg_replace(‘/ \<span aria\-label\=\”breadcrumb separator\”\>\/\<\/span\> [^\<]+/’, ”, $crumb);
}
}
