search ]

Change the Breadcrumb Delimiter in WooCommerce

To change the breadcrumb delimiter in WooCommerce, use the following filter:

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

In this case we replaced the slash with a vertical bar. Here are all the values you can change with this filter:

array(
   'delimiter'   => ' / ',
   'wrap_before' => '<nav class="woocommerce-breadcrumb">',
   'wrap_after'  => '</nav>',
   'before'      => '',
   'after'       => '',
   'home'        => _x( 'Home', 'breadcrumb', 'woocommerce' ),
)
Join the Discussion
0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!

Savvy WordPress Development official logo