Add breadcrumbs on homepage Storefront

Question

By default the breadcrumbs are not displayed on the homepage. I want to undo this. This is what I added to the functions.php file:

add_action( 'init', 'wc_add_storefront_breadcrumbs');

function wc_add_storefront_breadcrumbs() {
    
    if (is_home() || is_front_page()) {

        add_action( 'storefront_before_content', 'woocommerce_breadcrumb', 90 );
    }
}

But is does not work.. Any ideas how to fix this?

0
user3253002 4 months 0 Answers 13 views 0

Leave an answer