How to replace the delimiter in breadcrumbs WooCommerce

To replace the WooCommerce breadcrumbs delimiter, use the filter:

add_filter('woocommerce_breadcrumb_defaults','in_woocommerce_breadcrumb_defaults');

function in_woocommerce_breadcrumb_defaults($args){
    $args['delimiter']   = ' | ';
    return $args;
}

In this case, we changed the slash to a vertical line.

All array values that can be changed using the filter:

array(
   'delimiter'   => ' / ',
   'wrap_before' => '<nav class="woocommerce-breadcrumb">',
   'wrap_after'  => '</nav>',
   'before'      => '',
   'after'       => '',
   'home'        => _x( 'Home', 'breadcrumb', 'woocommerce' ),
)

Updated: 28.01.2019

Did this article help you? Rate it!
(No Ratings Yet)
Loading...


Leave a Reply

Your email address will not be published. Required fields are marked *