Support » Plugin: Yoast SEO » How to remove Products link – Shop

  • Hi,
    I’d like to remove the parent link “Products” (linked to shop page) in the breadcrumbs of product pages.

    Now I have “Home–>Products–>Product Category–>Product name

    I have tried this snippet in my functions.php file

    add_filter( 'wpseo_breadcrumb_links', 'custom_wpseo_breadcrumb_links' );
    function custom_wpseo_breadcrumb_links( $links ){
        if( is_product() ){
           // print_r( $links );
            unset( $links[1] );  // unset the second array item (starts from 0, 1, 2, ... )
     return $links;

    It worked, basically the Products link disappeared. But I don’t know why now the Product Category link is not linked anymore. In the source code I see it got class=”breadcrumb_last”.

    How can I fix it?


  • The topic ‘How to remove Products link – Shop’ is closed to new replies.