From the course: WordPress: Customizing WooCommerce Themes

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Change the breadcrumb separator

Change the breadcrumb separator - WordPress Tutorial

From the course: WordPress: Customizing WooCommerce Themes

Start my 1-month free trial

Change the breadcrumb separator

- [Instructor] You may have seen these little links in the top left that lead back to the home page or category page. They're especially helpful to get a user back to our previous page, hence why they're called breadcrumbs. Breadcrumbs are really common in eCommerce, and with WooCommerce, if you want to change the way they look, you can do that. The first thing we need to do is filter that default value. But, before I do that, I need to add yet more comments to my functions files, so I can actually read this. Changing the breadcrumb. So, the first thing you need to do is add a filter. We're gonna use, add_filter, followed by the filter name, woocommerce_breadcrumb_defaults. And then, we're gonna put in the function name that we're going to use to customize the breadcrumb, hplussports_breadcrumb, followed by a semicolon. Now, we're gonna write that function, I'm gonna copy this first, function and then V to paste, and we do have defaults, so I'm going to call this breadcrumb…

Contents