Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #16593


    I edited the my custom.css file in the theme folder and the default WordPress thumbnail image size configuration to enlarge the images in the single product page in the shop (using WooCommerce). I need to show 4 images in every row, but, when I have more, for example 7, when the counter arrives to 5 adds the <br style=”clear: both;”> tag.

    I think thera are the result of the gallery_shortcode() wordpress function. I checked the woocommerce-config/config.php but I can’t find any option to edit the number of colums for the gallery in the product details page.

    Can you help me please?




    Hi legogr,

    Kindly post a link to your site. Specifically the page which has the issue mentioned above.




    Hi Ismael,

    I have the “default wordpress gallery” configured for the image gallery. The big Image isn’t from gallery, is from the_excerpt();

    Thank you!



    Try to replace following line in the woocommerce config.php:

    if(!$gallery_active) echo do_shortcode('[gallery force="avia"]');


    if(!$gallery_active) echo do_shortcode('[gallery columns="4" force="avia"]');

    You can replace 4 with any other positive value of your choice.


    Great! Works fine. :-)

    Thank you Dude!


    Hi legogr,

    Glad that Peter helped you. :)



Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Image Gallery WooCommerce – Change columns’ is closed to new replies.