WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Products per row (2 posts)

  1. prettina
    Member
    Posted 1 year ago #

    Hi,

    I am unable to change the number of products per row using the following code:
    // 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

    }

    }
    I am using sommerce shop theme.
    The items appear 4 in a row in 1st row then 1 on 2nd row , again 4 items on 3rd row and 1 on 4th ....
    It looks awkward.However when i use a sidebar that code works , but i don't want a sidebar on my shop page.
    Please help.

    http://wordpress.org/extend/plugins/woocommerce/

  2. swicks
    Member
    Posted 1 year ago #

    Try setting the priority:

    add_filter('loop_shop_columns', 'loop_columns', 15);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic