Archived topic
Woocommerce - H1 headings for category pages
15 replies · Started by Marc-Andre on March 16, 2021
Hello,
I want to optimize my little store and I'm not able to add H1 to category pages. I use the Seller template. Is there a way to add these headings?
Thank you for support!
Hi Marc,
Go to Customizing > Layout > WooCommerce, check the Display page title box.
Let me know :)
Hi Ying,
Thank you for your reply. However, I don't seem to find that box. I see display options for products, categories, checkout, etc... but there is no box to check. May I find this option somewhere else?
In the meantime I found a way to had H1 via HTML in the description box of the category, but I don't want to have 2 H1 headings on the same page either (even if only one is visible).
Do you see the same options as in the documentation? It's the second check box.
https://docs.generatepress.com/article/woocommerce-overview/#shop
If not, make sure you have woocommerce module activated at Appearance > Generatepress
https://www.screencast.com/t/ZDvUKffl8HL
Perfect, I wasn't looking at the right place. Thank you for the article.
However I have another easy question about titles for which I seem unable to find it myself. How may I center them?
Do you mean the category page title?
It's the category name which you entered in the Dashboard > Product > Categories.
Yes, I mean the category name. I want it centered on the category page.
I also want the main shop page title to be centered.
I tried with HTML in the category name field, but it simply doesn't work.
I tried this CSS code, but it doesn't work either :
h1.entry-title {
text-align: center;
}
Is there a CSS code for centering all H1 headings that works or an option I didn't found in the parameters?
Try this CSS:
.woocommerce-products-header {
text-align: center;
}
Perfect, it works. Thank you for your support!
You are welcome :)
Hello,
I'd like to customize the H1 using this Css :
.woocommerce-products-header__title .page-title h1 {
font-size: 10px;
}
https://shop.teinturesauvage.fr/
But it doesn't work.
Could you please help me ?
Thank You
Hi Jean,
Try this:
h1.woocommerce-products-header__title.page-title {
font-size: 10px;
}
Why not make a block element and set the "location" to "product category archive" and then choose whichever name you have for that particular category?
Then you can add whatever you want to the top of your category pages including the generateblocks templates Headings. This is what I do, which adds some flare and content to the top of your woo-commerce category pages. Including h1's
Thanks Brent!
This would be an option as well :)
Thank you Ying, Brent and Leo !
Have a nice day.