I’m trying to move the title of my products on top (on top of the image) but i’m not sure how to do it… I want the title to be uptop on the product page not the archive page.
I’ve spent a long time researching about how to do it but nothing seems to work…
Is there a hook to move it ? Maybe change the layout on the product_page.php ?
2
Answers
First solution didnt worked but it might be related to my theme.
Second solution worked like a charm even tho i changed the hook :)
To answer my question : How to move the title on top of the product :
For better understanding the product template see the default content-single-product.php – https://gist.github.com/dompascal/7825580 and use this visual map – https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/
In your functions.php file in your active theme add the following:
Solution #1
Solution #2
Another way is to place title above all (depends on your design)
Solution #3
Override woocommerce templates in your theme. There is alot of examples but this is a good starting point – https://woocommerce.com/document/template-structure/
This solution will provide the best output of your template BUT will require more maintance in future.
If you use theme that override those templates or hooks then you need to work with the theme hooks. But this is specific per theme.