S
S
Spartak2018-04-06 20:48:42
WooCommerce
Spartak, 2018-04-06 20:48:42

How to remove link from yoast seo breadcrumbs?

Good day.
Tell me how to remove the store page (shop or Products) from breadcrumbs.
Type of bread crumbs: Home - Goods - product. Items should be removed.
Crumbs are output by plugin yoast seo v 7, Woocommerce v 3.3

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Spartak, 2018-04-06
@Spartak-rnd

I found a solution, maybe someone will need it.
add_filter('wpseo_breadcrumb_single_link' ,'hotel_remove_shop', 10 ,2);
function hotel_remove_shop($link_output, $link ){
if( $link['text'] == 'Products' ) {
$link_output = '';
}
return $link_output;
}
Where : Products - the link to be removed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question