How to set custom breadcrumb delimiter in WooCommerce

To set a custom breadcrumb delimiter in WooCommerce using the functions.php file, you can use the woocommerce_breadcrumb_defaults filter hook. This hook allows you to modify the default settings for the WooCommerce breadcrumb function.

Here is an example of how you can use this hook to set a custom breadcrumb delimiter in WooCommerce:

// Set custom breadcrumb delimiter in WooCommerce
// More snippets at wpunplugged.com 

function custom_breadcrumb_delimiter( $defaults ) {
    $defaults['delimiter'] = '>'; // Set the delimiter to ">"
    return $defaults;
}
add_filter( 'woocommerce_breadcrumb_defaults', 'custom_breadcrumb_delimiter' );

In this example, we are setting the delimiter to “>”. You can use any string or character as the delimiter.

Share this post

You might also like...

Comment

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