Your fancy clothes store is ready, you have the best clothes of the city, and hundreds of photos of them, ready to be uploaded in your store.
They will look great online, people will go crazy to buy them and you will be rich!
But how to use all those awesome photos you made? They just don’t fit, the product gallery in the single product page shows only three photos per row and the page looks too long.
What if I say you that you can change the number of photos per row with one line of code?
Disclaimer: If this snippet does not work, most probably your theme is overriding the template
product-gallery.php and it removed the filter within it.
Open the file functions.php located in wp-content/themes/your-theme-name/ and add this code at the end of it:
From now on, the single product gallery will show four pictures per row. You can further increase that by changing the value in the snippet.
Be careful though, you will probably need to change your CSS too to make them look properly or they will probably stretch or be too small.