How to add custom breadcrumb home URL in WooCommerce

To add a custom breadcrumb home URL in WooCommerce using the functions.php file, you can use the woocommerce_breadcrumb_home_url filter hook. This hook allows you to modify the home URL for the WooCommerce breadcrumb function.

Here is an example of how you can use this hook to add a custom breadcrumb home URL in WooCommerce:

// Add custom breadcrumb home URL in WooCommerce
// More snippets at wpunplugged.com 

function custom_breadcrumb_home_url( $home_url ) {
    $home_url = 'https://www.example.com'; // Set the home URL to "https://www.example.com"
    return $home_url;
}
add_filter( 'woocommerce_breadcrumb_home_url', 'custom_breadcrumb_home_url' );

In this example, we are setting the home URL to “https://www.example.com“. You can use any valid URL as the home URL.

Share this post

You might also like...

Backup

Jetpack for WordPress Review

Jetpack for WordPress is an amazing plugin that offers a wide range of features to help make your WordPress website more secure, efficient and user-friendly.

Read More »

Comment

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