• Resolved ilyapokrov

    (@ilyapokrov)


    How do I change the number of thumbnails in the product card? By default, 4 is displayed.
    The “woocommerce-product-gallery–columns-4” parameter sets this number per line.
    How do I change it to 7?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @ilyapokrov – You can use the following to make that adjustment:

    add_filter('woocommerce_product_thumbnails_columns', 'number_thumbnail_columns');
    function number_thumbnail_columns() {
        $columns = 7;
        return $columns;
    }

    Once the amount of columns reaches 7, however, the thumbnails styling may not be restrictive enough on the width of those line items.
    You can try this snippet with $columns set to 7, you just may also have to make some CSS adjustments to fix how they actually display.

    – Joey

    Thread Starter ilyapokrov

    (@ilyapokrov)

    @jricketts4,
    It did not help. I can still see the following classes:
    .woocommerce # page-wrapper .product .woocommerce-product-gallery .flex-control-thumbs li: nth-child (4n)

    Thread Starter ilyapokrov

    (@ilyapokrov)

    @jricketts4,
    Will you help me solve the problem ?!

    Mike W

    (@nixiack8)

    Hi @ilyapokrov,

    In this case, it might be best to reach out to your theme provider as it could require some additional custom CSS that can help out with this. They can assist in locking it into the theme so that when the theme and/or WooCommerce/plugins update it does not lose it.

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @ilyapokrov. Hopefully you have been able to resolve this issue. Since we haven’t heard back from you, I’m going to go ahead and mark this thread resolved. If you have any other questions, please feel free to start a new thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘number of thumbnails in the product card’ is closed to new replies.