Changing product titles H3 into H2 on the product archive (collection) page
-
Hello,
I would like to change the “<h3 class”wd-entities-title”>” to h2 on all my products (inside the collection pages). Here is a screenshot that shows what needs to be changed.
Is there any way to do it? It would be to improve SEO.
Thank you very much in advance!
Attachments:
You must be
logged in to view attached files.
Hello,
Could you please check how it works with some default WordPress themes like WooCommerce Storefront to understand if it is our theme issue or not?
Kind regards
Hi there,
How am I supposed to make such a change on another wordpress theme ? I am sorry, I don’t know how to do it. I used to use shopify before and it was automatically H2.
I think your theme puts it in h3 automatically. Is there any way to change it manually on your side ?
many thanks
Hello,
By default WooCommerce sets there the title as h3, here is a 2025 default theme – https://prnt.sc/ZXbcuH86BnXk
Define the code below in the functions.php file in your child theme –
if ( ! function_exists( 'woocommerce_template_loop_product_title' ) ) {
function woocommerce_template_loop_product_title() {
echo '<h2 class="wd-entities-title"><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></h2>';
}
}
Clear the cache and recheck the issue.
Kind Regards
I will try this and let you know how it goes. Thank you!
Hello,
Okay, I will wait for your response.
Have a good day!
Kind Regards
Excellent, it worked. Thank you 🙂
Hello,
You are welcome! If you do not mind, can you please leave a 5 stars rating for our theme by going here: http://themeforest.net/downloads It will allow us to release more updates and provide dedicated support in the future. It would encourage our work a lot.
Have a good day!
Kind Regards
The topic ‘Changing product titles H3 into H2 on the product archive (collection) page’ is closed to new replies.