Remove “Shop” base from TSF breadcrumbs
-
I was searching for a solution to this, but could not find anything published, so I created my own. If anyone else is working with TSF in WooCommerce and wants to remove the static “Shop” base from the TSF breadcrumbs for the product post type, just like you can in SEOPress or YoastSEO, you can use this filter as a starting point:
add_filter('the_seo_framework_breadcrumb_shortcode_output', 'custom_remove_shop_base_from_breadcrumb'); function custom_remove_shop_base_from_breadcrumb($output) { $output = preg_replace('#<li class="breadcrumb-item"><a href="[^"]+/shop/">Shop</a></li>#', '', $output); return $output; }If there is a better solution or filter, let me know! Otherwise I hope it helps.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Remove “Shop” base from TSF breadcrumbs’ is closed to new replies.