How to remove “Home” from WooCommerce Breadcrumbs

Easy tweak to clean up your pages

How to remove "Home" from WooCommerce Breadcrumbs

Vanja K.
Vanja K. / April 6, 2023 / 324 Views

An easy-to-add snippet of code that will clean up your single product pages and single blog posts

This was a simple request, but a rather impactful request by one of our clients. Their eCommerce store, made in WooCommerce by our team displays breadcrumbs on top of their page. It’s a great way of showing the customer where they are, but also, a pretty good solution for more onsite links for SEO (Search Engine Optimization) value.

However, the standard breadcrumbs in WordPress and WooCommerce start with “home”. Sure, it’s good to link back to your homepage, but like our client, we can safely guess you’re already linking to it through your logo or a top menu item. In turn, the “home” in the breadcrumb line is redundant and it looks odd. Hence, we’ve removed it fully.

Here is how we do it below. Just copy and paste this into your functions.php, preferably through an FTP/SFTP app, not in the WordPress editor itself. It’s safer, and easier to revert back if things go wrong. However, if you’re unsure how to do this or have doubts about your skill level, feel free to contact us and we’ll happily handle this for you at an affordable rate.

/** Remove Home from WooCommerce single pages breadcrumbs **/

add_filter('woocommerce_breadcrumb_defaults', function ($defaults) {

$defaults['delimiter'] = '<span class="breadcrumb_delimiter"> / </span>';
return $defaults; //returns rest of links
});

Copy
DISCLAIMER:

Please use the code, advice, and information presented on this website with caution. Nucleus J.D.O.O, or any of its employees, cannot be held responsible for any damages that this code might cause. We always try to update the code shown on our website, but we cannot guarantee its functionality with various themes, templates, or coding. Please ensure that you test each code thoroughly in order to use it safely.

Need some of our services?
Get in
touch and we'll
send you a free cost estimate for your project!

    Contact Form Image
    MORE BLOGS
    We got more related posts, check them out!
    Contact Form 7 Update and Google reCaptcha Issues
    A few weeks ago, Contact Form 7, version  5.8 was released. It brought a lot of bug fixes and it’s one of the most important updates for this highly regarded contact plugin in a while. However, it brought on its own set of problems which we’re dealing with for several of our clients. But, before […]
    Vanja K.
    CEO & CTO
    Read More
    How To Add Your Company Logo To The WordPress Login Page
    We get asked this a lot: how to add your company’s logo to the backend login page for WordPress. It makes the whole thing look more prefessional, and in turn, makes the whole thing a lot more appealing to a lot of our clients who have more than one admin or shop manager. The procedure […]
    Vanja K.
    CEO & CTO
    Read More
    Limit Search Results to WooCommerce Products
    Make sure your customers see only WooCommerce products when searching for items on your online store, giving them a better showcase of your offerings Running a WooCommerce website requires some pretty straightforward tasks at hand each and every day. However, there are also some custom tweaks that some eCommerce admins would like to have for […]
    Vanja K.
    CEO & CTO
    Read More
    Newsletter
    Stay up to date. It's worth it.
    Newsletter Background Image