Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Created February 8, 2013 17:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameskoster/4740660 to your computer and use it in GitHub Desktop.
Save jameskoster/4740660 to your computer and use it in GitHub Desktop.
WooCommerce - Change the breadcrumb home url
add_filter( 'woocommerce_breadcrumb_home_url', 'woo_custom_breadrumb_home_url' );
function woo_custom_breadrumb_home_url() {
return 'http://woothemes.com';
}
@patrickallmond
Copy link

Tried using this code on a WooCommerce + Genesis theme and it did not change anything. Even tried pasting it line for line. No effect. Ideas?

@StephGlitter
Copy link

I know this is 3 years later but hopefully will help someone.

There are 2 typos with the word 'breadcrumb' in the code - it is missing the letter C. This is why it wouldn't work. When I corrected the spelling then it worked. I've added the correct code below...

add_filter( 'woocommerce_breadcrumb_home_url', 'woo_custom_breadcrumb_home_url' ); function woo_custom_breadcrumb_home_url() { return 'http://woothemes.com'; }

@CHEWX
Copy link

CHEWX commented Mar 24, 2017

Would be cool to update this as it is used for documentation.

@mrseoliveira
Copy link

I want to redirect the Home button to the store home, but it's always going to the homepage..

add_filter( 'woocommerce_breadcrumb_home_url', 'woo_custom_breadcrumb_home_url' );
function woo_custom_breadcrumb_home_url() {
return 'http://misci.pt/en/shop';
}

@joe-web
Copy link

joe-web commented Mar 2, 2018

i was going to skip even trying this code after reading mrseoliveira's comment just above but, luckily, copying the code presented at the top of this post, replacing the woothemes url with mine, and pasting it to the top of my functions.php worked perfectly.

many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment