Support » Plugin: WooCommerce » number of product columns on category page

  • jdalen


    HI, using woocommerce and superstore theme, having problem where even through in Settings i specified 4 product columns for the Catalog page, only 1 or 2 columns will display.

    Tried changing via functions file with each of these:

    // Change number or products per row to 3
    add_filter(‘loop_shop_columns’, ‘loop_columns’);
    if (!function_exists(‘loop_columns’)) {
    function loop_columns() {
    return 3; // 3 products per row

    And this:
    // Override theme default specification for product # per row
    function loop_columns() {
    return 5; // 5 products per row
    add_filter(‘loop_shop_columns’, ‘loop_columns’, 999);

    but neither worked.

    also tried this solution in a forum in css file.
    .woocommerce .products ul, .woocommerce ul.products, .woocommerce-page .products ul, .woocommerce-page ul.products {width:100%;}
    .woocommerce ul.products li.product, .woocommerce-page ul.products li.product {clear:none;}

    Also tried Woocommerce Customizer and Archive Customizer plugins and set those to display products in four columns as well – but none of these proposed solutions have worked.

    Any other suggestions?

    Thanks in advance

Viewing 1 replies (of 1 total)
  • I know its late, but in-case someone still looking.

    Issue is not with shortcode really or filters. Its CSS.

    In product category shortcode if you specify columns=”3″, you will notice HTML code on frontend it will be like

    <div class=”woocommerce”>
    <ul class=”products clearfix products-3″>

    you can make use of class “product-3” to get what u need.

    here is simple CSS that helped me,

    .products.clearfix.products-3 li {
    width: 29% !important;

    Ofcourse it will depend on your theme.

Viewing 1 replies (of 1 total)
  • The topic ‘number of product columns on category page’ is closed to new replies.