Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @charliexstanford

    Thanks for using the Yoast SEO plugin. The plugin code documents the available developer filters for customizing many of our plugin features. We also have a?developer portal?with more information about filters and many examples of how to implement them.

    You or your developer can use?the filter here?to customize/remove breadcrumbs for specific items such as product pages or single pages.

    Typically code snippets are added to your theme’s functions.php file. If you’re unfamiliar with using code snippets, we’d like to refer you to the WordPress documentation on how to use a filter.

    Thread Starter charliexstanford

    (@charliexstanford)

    I was able to go through the documentation and create the code. If anybody reading this wants to hide the product title from the woocommerce shop page, user this code:

    add_filter(‘wpseo_breadcrumb_single_link’, ‘remove_breadcrumb_title’ );
    function remove_breadcrumb_title( $link_output) {
    if (is_singular( ‘product’ ))
    {
    if(strpos( $link_output, ‘breadcrumb_last’ ) !== false ) {
    $link_output = ”;
    }
    }
    return $link_output;
    }

    I have one more question. How can I replace the “Woocommerce shop page” with custom taxonomy?

    So currently URL looks like this – Home >> Shop >> Taxonomy term > Product

    I want – Home >> Taxonomy Name >> Taxonomy term >> Product

    Plugin Support Maybellyne

    (@maybellyne)

    If I understand correctly, you’d like to remove the /shop/?from your product URLs. However, according to WooCommerce documentation, it’s highly not recommended due to how WordPress resolves its URLs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing last child from breadcrumb for product and single pages only’ is closed to new replies.