Change WooCommerce Shop Column Count

Change WooCommerce Shop Column CountThere is no administrative option to change the column count in WooCommerce, but you can easily accomplish it by adding the following `PHP` code into your theme’s `functions.php` file:

class ThemeFilters
{

function __construct()
{
add_filter(‘loop_shop_columns’,array($this,’loop_shop_columns’));
}

function loop_shop_columns($cols)
{
return 3;
}

}

new ThemeFilters();

In this demonstration the columns are set to 3 but you can change it to 2 columns, 2 columns, or any number of columsn you desire. Change the return value `return 3` above to meet you needs.

Related Posts:

  • No Related Posts
This entry was posted in Tech Tips, Web Development. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *