Archived topic
How to Add a Button to WooCommerce Product Page
21 replies · Started by Forum User on December 18, 2022
How do I Add a Button to a WooCommerce Product Page?
Hi there,
YOu can use a WooCommerce hook:
https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/
With a block element:
https://docs.generatepress.com/article/block-element-hook/
Hope this helps :)
Please send me the exact (code) to add a button to a WooCommerce product page.
If you are using a block element with GenerateBlocks then you can use the buttons block:
https://docs.generateblocks.com/article/buttons-overview/
If you aren't using GB then you can use the core button block:
https://wordpress.org/support/article/buttons-block/
It shouldn't require any code at all.
The Generate blocks plugin is installed but I am unsure where to find the block element. https://postimg.cc/f3PY2tvY
A hook needs to be selected:
https://www.screencast.com/t/9o4AZIwrEe1d
Which hook needs to be selected?
That depends on where you are trying to add it.
Please review my initial reply that included a link to the hook location visual guide:
https://generatepress.com/forums/topic/how-to-add-a-button-to-woocommerce-product-page/#post-2466243
Those are hooks from WooCommerce itself so unrelated to GP.
It is the Product description area. I selected woocommerce_single_product_summary but that is not working.
Can you clear and disable your caching plugin first?
I cleared and disabled the cache plugin but it is still not working.
Can you show me a screenshot of your setup again?