Sometimes you may need to add an extra text below an image to inform the customers about something important.
It could be one or more of the following:
- warranty period
- refund policy
- shipping delays
- promotions that you’re currently running
You can paste the following code into your custom functions.php file or even better a custom plugin.
This is php code. As always please make a backup of the file you're editing. This is for educational purposes only.
add_action( 'woocommerce_product_thumbnails', 'orb_post6922_add_custom_content_below_product_gallery' );
/**
* This allows you to add custom content below product images.
* @see https://orbisius.com/6922
* @return void
*/
function orb_post6922_add_custom_content_below_product_gallery() {
// you can optionally add this if you want to have background
// background: #efefc0;
?>
<div class="orb_club_wc_product_page_guarantee" style="margin: 0.5em 0; padding: 0.5em;">
<strong>Attention grabbing text: </strong>
Some more cool content.
</div>
<?php
}
Other links that cover the same topic.
- https://therichpost.com/woocommerce-hook-add-icon-on-a-single-product-gallery-image/
- https://www.businessbloomer.com/woocommerce-add-content-below-the-single-product-page-images/
Referral Note: When you purchase through a referral link (if any) on this page, we may earn a commission.
If you're feeling thankful, you can buy me a coffee or a beer