If you want to control how many products appear in each row on the WooCommerce shop/category pages, you can use the loop_shop_columns filter.
Steps
- Add the code below to your theme’s
functions.php. - Change
4to the number of products you want per row. - Save and refresh your Shop page.
/**
* Change WooCommerce products per row
*/
function custom_woocommerce_products_per_row( $columns ) {
return 4;
}
add_filter( 'loop_shop_columns', 'custom_woocommerce_products_per_row', 20 );