This article is not accompanied by pictures

Modify the number of images in the WooCommerce product gallery

By default WordPress uses WooCommerce to pass products, the product album is to show 4 pictures, if you want to show more number of product pictures in a row, you can add the following code inside the theme function file to achieve it.

// Adjust the number of single-row displays in the product catalogue
add_filter( 'woocommerce_product_thumbnails_columns', create_function( '', 'return 4;' ) );

Just change the 4 in the code above to the number of images you want to display.

After the modification of different themes may also need to modify the css style, this will not have a common code, you need to adjust according to the actual situation of their own websites.

4/5 - (1 vote)
Scroll to Top