Member-only story
Add HTML Tag And Class To WooCommerce Category/Archive Page Title
I frequently visit WooCommerce Facebook groups with 2 intentions:
- Discover what problems shop owners and developers are facing.
- To learn something new.
Both of these are deeply intertwined.
That said, when I do happen upon a problem I feel like I can solve, I make it a point to write about it.
Mainly as documentation to my future self, to solidify concepts I am learning/have learned, and to share with others.
I like to think of this as “Discovery Writing” as I’m typically discovering and learning new things.
Receive a free copy of my eBook, “10 MySQL Tips For Everyone”, when you subscribe to the weekly OpenLampTech newsletter.
In this article, I’m going to show how you can customize the H1
category/archive page title in WooCommerce by adding a <span></span>
element and class to it, in addition to some content just for display purposes.
I’m sure you could add different HTML elements (with or without classes) as well but since this was part of the OP’s ask, I’ll stick with that.
For the examples in this post, I am using a test site running on Local by Flywheel with the latest WooCommerce version (at the time…