Modify the H1 title of the product category page
-
I want to add a first-level category name to the H1 title of the shop archive. (Image: shop1.png)
Want to add it through code.
I found this: “wp-content/themes/woodmart/themes/woodmart/inc/modules/layouts/elementor/shop-archive/class-woocommerce-title.php” (Image: shop2.png)
And created a new one in the child theme: “wp-content/themes/woodmart-child/themes/woodmart/inc/modules/layouts/elementor/shop-archive/class-woocommerce-title.php”.
But it doesn’t work.
What is the correct solution? Should I overwrite “class-woocommerce-title.php” or rewrite “woocommerce_page_title()”?
Attachments:
You must be
logged in to view attached files.
Hello,
Navigate to Layouts -> Product archive -> edit this layout – https://prnt.sc/OG92hEbVusjz, then change the tag in the page builder – https://prnt.sc/R5haF3UVEGDq
Kind Regards
Thanks Reply. I know what to change, I mean, I want to customize the H1 title.
Hello,
The Layout pages cannot be overridden via the child theme. Please clarify how exactly you want to customize the title.
Thank you for your time.
Kind Regards
I want the H1 title content of this piece to be equal to the slug of the page, or equal to the keywords defined by the Rank Math SEO plug-in.
Where can this be achieved by modifying the code?
Hello,
Sorry, but this https://prnt.sc/2ivKa3232RXy title cannot be customized because it is developed via classes that cannot be overridden via a child theme, unfortunately. I suggest you disable the Layouts and then make such custom changes for the default titles from WooCommerce.
Kind Regards
Hello,
Always remember that you can reach out to us with any questions you may have.
Have a good day!
Kind Regards
The topic ‘Modify the H1 title of the product category page’ is closed to new replies.