Change no of prod

Hi, is there a way to have 4 products in a catalog row instead of 3?

See my site: https://zaaldesign.nl/berk/webshop/

Hope you can help.

Thanks,
Jan

Hello Jan,

You can change the default number of products per row by adding this function to your child theme’s functions.php file.

add_filter('loop_shop_columns', 'loop_columns');
if (!function_exists('loop_columns')) {
	function loop_columns() {
		return 4; // 4 products per row
	}
}

If you aren’t running a child theme, you can use a plugin that allows extra functions addition like Code Snippets.

Regards,
Kharis

Hello Kharis,

I added the code to the child theme but nothing happens.

What to do now?

Best regards,
Jan

Hello there,

Try this code please.

remove_filter('loop_shop_columns', 'talon_shop_columns');
add_filter('loop_shop_columns', 'loop_columns', 9999);
if (!function_exists('loop_columns')) {
	function loop_columns() {
		return 4; // 4 products per row
	}
}

Regards,
Kharis