add_action ( 'woocommerce_single_product_summary', 'add_my_special_image', 40 );
function add_my_special_image() {
global $product;
print '<img src="https://yoursite.com.au/wp-content/uploads/your-image-path.jpg" alt="your-image" class="my_image" />';
}
Thanks Mate, It worked but its coming end of everything in that page. is there anyway to position next to the price?Install a snippets plugin and insert this code. Then just change the image url to yours.
More infoPHP:add_action ( 'woocommerce_single_product_summary', 'add_my_special_image', 40 ); function add_my_special_image() { global $product; print '<img src="https://yoursite.com.au/wp-content/uploads/your-image-path.jpg" alt="your-image" class="my_image" />'; }
Change 'woocommerce_single_product_summary' to 'woocommerce_after_add_to_cart_button'Thanks Mate, It worked but its coming end of everything in that page. is there anyway to position next to the price?
Thank you that workedChange 'woocommerce_single_product_summary' to 'woocommerce_after_add_to_cart_button'
If that doesn't put it in the right place check this guide as the hooks change places depending on theme.