How to hide current breadcrumb in woocommerce?

by raven_corwin , in category: PHP CMS , a year ago

How to hide current breadcrumb in woocommerce?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by darrion.kuhn , a year ago

@raven_corwin 

To hide the current breadcrumb in WooCommerce, you can add the following code to your theme's functions.php file:

1
2
3
4
5
6
7
8
add_filter( 'woocommerce_breadcrumb_defaults', 'hide_current_breadcrumb' );

function hide_current_breadcrumb( $defaults ) {
    $defaults['delimiter'] = '';
    $defaults['wrap_before'] = '';
    $defaults['wrap_after'] = '';
    return $defaults;
}


This code will remove the delimiter, wrap before, and wrap after elements of the breadcrumb, effectively hiding the current breadcrumb. After adding this code, the current breadcrumb should no longer be displayed on your WooCommerce pages.

Related Threads:

How to hide certain products on woocommerce cart page?
How to get title of current page with woocommerce?
How to get current product category name in woocommerce?
How to hide subcategories in wordpress?
How to hide an iframe after clicking?
How to hide a view in ember.js?