Change the Number of Product Gallery Thumbnails per Row
Sets how many thumbnails appear in each row below the main product image on product pages.
Opens WPIDE on
Code
add_filter( 'woocommerce_product_thumbnails_columns', function () {
return 5; // Thumbnails per row.
} );
Notes
Some themes override the gallery layout with their own CSS; adjust there if the change does not show.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.