• Resolved buzut

    (@buzut)


    I can’t find anywhere if there’s a mean to customize breadcrumb path for products eitger with “basic” Yoast SEO or with the WooCommerce plugin.

    Currently, the output is like so : Home > Products > Product.

    What I’d want instead is to have :
    * Home > Parent product cat A > Product for some products
    * Home > Parent product cat B > Product for some other products.

    Is that doable? If so how?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can modify the title of the last breadcrumb by going to the advanced tab of your page or post and updating the value of ‘Breadcrumbs Title’ and we have more information on this here: https://kb.yoast.com/kb/change-breadcrumb-title/

    Also, there are several filters that allows you to modify the breadcrumbs including wp_seo_get_bc_title and wp_seo_get_bc_ancestors and you can view more information on these here: https://yoast.com/wordpress/plugins/seo/api/

    Closed. No further questions.

    Thread Starter buzut

    (@buzut)

    Hi!

    Sorry, I hadn’t seen your answer. Notification went to the spambox.

    I tried the wp_seo_get_bc_ancestors but it doesn’t seem to work.

    
    // functions.php
    
    function breadcrumb_ancestors($arr) {
        var_dump($arr);
    }
    
    add_filter('wp_seo_get_bc_ancestors', 'breadcrumb_ancestors', 10, 1);
    

    Nothing happens, so unless I’ve got something wrong, the filter does nothing.

    • This reply was modified 6 years, 5 months ago by buzut.
    • This reply was modified 6 years, 5 months ago by buzut.
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Add parent category to breadcrumb’ is closed to new replies.