WooCommerce: Add Content Below Single Product Images

One of the latest WooCommerce versions introduced an optimized product gallery on the single product page. If your products have multiple images and therefore use the product gallery, you might want to also add content below the gallery itself. But…

If you’re familiar with WooCommerce customization and WooCommerce hooks (and specifically the ones of the Single Product Page), you’ll know it’s now impossible to add content under the image as it used to be done with the “woocommerce_product_thumbnails” hook.

In fact, the new gallery completely replaces the default content via JQuery, including that hook. Adding content is not as easy as it used to be. So, here’s the workaround (you might want to check how it behaves on mobile or maybe completely hide this for small devices – this has been tested on desktop only).

Add content below the WooCommerce Single Product Page images

PHP Snippet: Add Content Below the Gallery Images @ WooCommerce Single Product

 * @snippet       Add Content Below the Gallery Images @ WooCommerce Single Product
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 4.1
 * @community     https://businessbloomer.com/club/
// Note 1: this works on Storefront theme, might need customization for other themes
// Note 2: class "woocommerce-product-gallery" is vital for inheriting CSS float left, margins and widths
add_action( 'woocommerce_after_single_product_summary' , 'bbloomer_add_below_prod_gallery', 5 );
function bbloomer_add_below_prod_gallery() {
   echo '<div class="woocommerce-product-gallery" style="background: #fdfd5a; padding: 1em 2em">';
   echo '</div>';

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

  • WooCommerce Visual Hook Guide: Single Product Page
    Here’s a visual hook guide for the WooCommerce Single Product Page. This is part of my “Visual Hook Guide Series“, through which you can find WooCommerce hooks quickly and easily by seeing their actual locations (and you can copy/paste). If you like this guide and it’s helpful to you, let me know in the comments! […]
  • WooCommerce: Disable Variable Product Price Range $$$-$$$
    You may want to disable the WooCommerce variable product price range which usually looks like $100-$999 when variations have different prices (min $100 and max $999 in this case). With this snippet you will be able to hide the highest price, and add a “From: ” prefix in front of the minimum price. At the […]
  • WooCommerce: Hide Price & Add to Cart for Logged Out Users
    You may want to force users to login in order to see prices and add products to cart. That means you must hide add to cart buttons and prices on the Shop and Single Product pages when a user is logged out. All you need is pasting the following code in your functions.php (please note: […]
  • WooCommerce: Add Custom Field to Product Variations
    Adding and displaying custom fields on WooCommerce products is quite simple. For example, you can add a “RRP/MSRP” field to a product, or maybe use ACF and display its value on the single product page. Easy, yes. Unfortunately, the above only applies to “simple” products without variations (or the parent product if it’s a variable […]
  • WooCommerce: Show Number Of Products Sold @ Product Page
    WooCommerce database already stores the number of products sold for you. Therefore, you may want to show such number on the product page, close to the Add To Cart button. As we’ve seen in my book Ecommerce and Beyond, showing the number of sales for each product can increase your sales conversion rate. All you […]

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

36 thoughts on “WooCommerce: Add Content Below Single Product Images

  1. Worked for me! Thank you a lot, I wasted a couple of hours struggling with this task, but your article saved me! Thank you

  2. Hi,
    I used this code but it renders the content in between the left and right columns’ content. I mean, it shows the text in the middle of the image and product data in the right column area.


    1. Maybe you need additional CSS depending on your theme

  3. Found your example and want to know how I can show different content for each product?

    1. Rubb, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  4. Apparently this doesn’t work with newer version of WooCommerce that is using flex for gallery images. Any tips?

    1. Hello Zia, if you remove the “woocommerce-product-gallery” class, does it work?

      1. nope, doesn’t work.
        seen at the bottom.

        1. You may need additional CSS then, sorry

  5. Thanks for this. Is there a way to add pages to a single product. For instance when customers click a good, it takes them to a product page. On that product page, I want them to be able to enter the size and then click a button that we open another page for the, to select the fabric they want to use, and then a next page to summarise what they have selected next to the original style

    1. Hello Lady, thanks for your comment! I think you can do that (or similar) with this: https://businessbloomer.com/woocommerce-how-to-sell-product-customizations-add-ons/

  6. Any way to wrap a function into this function? I’m trying to move woocommerce_template_single_rating (among other things) under the product thumbnail area. Thanks.

    1. Hey there, thanks for your comment – yes, of course, you can enter there any WooCommerce function you like. Give it a go

  7. Hi, Thanks for Snippet
    My question is; Is it possible to modify it to be visible in specific Categories?

    1. Hey Boun, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  8. While this works to show static data I am having difficulty making it work to move one of the woo template functions underneath the picture. Eg. I would like to move the variation select form under the picture and gallery so that users can quickly flip between the options and see corresponding picture without scrolling back up to the top of the page. Any tips there? Thanks!

    1. Hey Adan, thanks for your comment ๐Ÿ™‚ You also need to make sure you’re moving the “form” otherwise those select and input fields won’t work. It’s a very delicate thing. Hope this helps

  9. Worked for me! Thanks a mill!

    1. ๐Ÿ™‚

  10. Dear Sir,
    I want to add some pictures (at thumbnail product) to all single products page. Please help me.

    1. Hello Trung – thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

  11. Yes it works but having a positioning issue, as displayed in the example image.

    1. Hey Samuel, thanks for your comment! You might need custom CSS specific to your theme, this snippet can’t be valid for all themes ๐Ÿ™‚

  12. I have tried to add this code in my Avada child theme function.php but nothing happens ๐Ÿ™

    1. Hey Steph, thanks for your comment! Probably Avada has deep WooCommerce customization so default snippets don’t always work. Try to switch temporarily to another theme just to make sure the snippet works ๐Ÿ™‚

  13. Hi I’ve tried this and it work’s, work in the sense of it has an output… but it is different from the example image above because it is positioned below the product gallery and description.

    1. Hey Ray, thanks for your comment! Try with a “clear: left”, see comment https://businessbloomer.com/woocommerce-add-content-below-the-single-product-page-images/#comment-37054 – let me know ๐Ÿ™‚

  14. Good day. Thank you so much for this. I got it to work perfectly here: https://www.johnnieandpaw.co.za/product/pierced-pendant-resin/

    But … my question is, is it possible to hide it on a mobile phone? If you could help me with that I will be eternally grateful.

    Using Divi.

    1. Hello there and thanks for your question! Of course, you could try wrapping the inside of the function between a conditional check, and use the helpful WordPress function wp_is_mobile():

      function bbloomer_add_below_prod_gallery() {
         if ( ! wp_is_mobile() ) {
      	/* Rest of the original function goes here */
  15. When I tried this in Storefront theme it put the yellow div above the Description/Additional Information/Reviews tabs.
    This change seems like a bad regression. Maybe the solution is to add a ‘replacement’ action e.g.
    near the bottom of templates/single-product/product-image.php.

    If you can think of a good use case for putting info under the thumbnails then I’ll happily submit a pull request.

    1. Cheers Damien!

      1) Do your products have a product gallery? This won’t work if there is only 1 featured image
      2) Did you keep the CSS class inside the PHP snippet? That gives you the float:left and aligns the div under the product gallery

      Let me know ๐Ÿ™‚

    2. 1) Yes, product image and 2 images in product gallery.
      2) Yes, CSS retained.
      Screenshot: https://i68.tinypic.com/vfvbjl.png

      1. Ah thanks Damien! Possibly the element is floating left but because there is more vertical spacing in the right columns is going there. Try either adding a short description that “pushes” the element to the left (as a test) to see if this theory is correct.

        After this simple test, maybe you can solve this by adding “clear: left” to the yellow DIV?

  16. thanks for your sharing ! this is helpful articles !

    1. Cool ๐Ÿ™‚

Questions? Feedback? Customization? Leave your comment now!

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *