Customizing woocommerce product title

Yes. You can add tags or whatever you want you can add next to the woocommerce product title. In this article, we are customizing the woocommerce product title.
Let’s get started
make a note that, what you have to modify in the woocommerce product title. Then open your active theme’s functions.php file and paste the below code.

add_action('woocommerce_single_product_summary', 'woocommerce_my_single_title',5);

if ( ! function_exists( 'woocommerce_my_single_title' ) ) {
function woocommerce_my_single_title() {
<h1 itemprop="name" class="product_title entry-title"><span><?php the_title(); ?></span></h1>

Now you can see the changes in woocommerce product title, by inspecting the element. here in this example, we have added the <span> tag to the title. In this place, you can modify as per your requirement.

I hope this article helped for queries. If you are looking more customization, please comment in the comment section below.

Happy coding 🙂

About the author


A coder who is trying to solve some problems via "Procoders", Software Engineer By Profession, WEB Enthusiast, Hobby Blogger. I love to share Tech Ideas and like to learn and explore new things and Technologies.

Add Comment

Click here to post a comment