is_home() or is_front_page() not working [closed]


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?

user3253002 4 months 0 Answers 24 views 0

Leave an answer