WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Woocommerce Breadcrumbs - Where to change 'home' text (9 posts)

  1. samandella
    Member
    Posted 1 year ago #

    Hi

    I hope someone can help.

    I've changed the url of 'home' in woocommerce breadcrumbs e.g. home/shop/product so now 'home' doesn't go to the website home page but to a different page named 'collections' but where do I change the text so it reads collections/shop/product instead of home/shop/product?

    I've looked everywhere!! Any ideas?

    http://wordpress.org/extend/plugins/woocommerce/

  2. jameskoster
    Member
    Plugin Author

    Posted 1 year ago #

    Hey, take a look at this document which describes how to customise the WooCommerce breadcrumb; http://docs.woothemes.com/document/customise-the-woocommerce-breadcrumb/

  3. samandella
    Member
    Posted 1 year ago #

    Excellent!! Thanks very much :D

  4. kifiko
    Member
    Posted 3 months ago #

    Warning: PHP newbie.

    I, too, want to change the Home breadcrumb link to the Shop page. Sadly I don't understand the solution stated as

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

    Let's say my shop page is at http://www.ccrt.net/store/ .
    What exactly would I want my 'add_filter' to say?
    And do i replace the add_filter function already in functions.php file?

    humbly,
    Kathie

  5. kifiko
    Member
    Posted 3 months ago #

    THis topic is marked as resolved but I still need help! Please see my previous post.

  6. wellebit
    Member
    Posted 3 months ago #

    kifiko,

    Do not replace add_filter function that already exist in functions.php file if you do not want to disrupt the proper integration of Woocommerce plugin into your theme.

    You only need to change URL after "return" to URL of your shop page, as I have done below:

    add_filter( 'woocommerce_breadcrumb_home_url', 'woo_custom_breadrumb_home_url' );
    function woo_custom_breadrumb_home_url() {
    return 'http://www.ccrt.net/store/';
    }

    Insert this snippet after the last "}" on the end of the add_filter function already in youre functions.php file.

    Greetings

  7. kifiko
    Member
    Posted 3 months ago #

    Thanks so much for spelling this out for me, wellebit. Sadly I am still missing the mark in some way.
    Please see

    I added the snippet to \themes\ThemeName\functions.php such that the code now looks like

    add_filter( 'wp_page_menu_args', 'et_add_home_link' );
    add_filter( 'woocommerce_breadcrumb_home_url', 'woo_custom_breadrumb_home_url' );
    function woo_custom_breadrumb_home_url() {
    return 'http://www.ccrt.net/store/';
    }

    There was no } after the existing add_filter call. Can you tell me how I've messed up?

    Kathie

  8. kifiko
    Member
    Posted 3 months ago #

  9. wellebit
    Member
    Posted 3 months ago #

    Each theme has specific settings of woocommerce plugin. I Think I know the solution of the problem. However, it is not convenient to explain here the details. If you want, send me a functions.php file and I will try to set snippet to the right place, and I'll return the modified file to your email. My email is wellebit@gmail.com

    Nenad

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic