Created
November 7, 2018 13:51
-
-
Save rwkyyy/869d300080ab989c72aadfd4db362591 to your computer and use it in GitHub Desktop.
add a button on product page description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_single_product_summary', 'add_after_description_rwk', 25 ); | |
function add_after_description_rwk() { | |
?> | |
<div class="button">HIT ME</div> | |
<?php } |
Hi @abdullapk,
The <div class="button">HIT ME</div>
is for example purposes, can be changed with anything.
To add it next to the add to cart, nearest you can do is to use woocommerce_before_add_to_cart_button
instead of woocommerce_single_product_summary
, you will still have to use some CSS to make it display inline.
Hi
what i want is to add a button on the product description in woocommerce
product page
Please check the screenshot
[image: image.png]
[image: image.png]
…On Mon, Nov 18, 2019 at 4:32 PM Eduard ***@***.***> wrote:
Hi @abdullapk <https://github.com/abdullapk>,
The <div class="button">HIT ME</div> is for example purposes, can be
changed with anything.
To add it next to the add to cart, nearest you can do is to use
woocommerce_before_add_to_cart_button instead of woocommerce_single_product_summary
, you will still have to use some CSS to make it display inline.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://gist.github.com/869d300080ab989c72aadfd4db362591?email_source=notifications&email_token=ANZYF7IRJUTU6R7GLAEEBGLQUKDOBA5CNFSM4JOSYTOKYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF4LXI#gistcomment-3086196>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANZYF7JGSN2JE6NFEDI2UNLQUKDOBANCNFSM4JOSYTOA>
.
https://www.spanningglobal.com/product/air-jordan-shoes/
Please have a look on the website.
On the description i need to add a link.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can i add button next to cart ?
When i click on it, it goes to another page..
Example a button with link ( different products have different links)