Woocommerce Change default number of coloumns when adding products via shortcode
-
Hi everyone,
I want to change the coloumn number of shown products from 4 to 3. I already managed to do that on the shop page using this code:add_filter('loop_shop_columns', 'loop_columns'); if (!function_exists('loop_columns')) { function loop_columns() { return 3; // 3 products per row } }
However if I use a shortcode like
[products ids="7297" ] [product_category category="xyz"]
I still get 4 products per row. I know I can change this using
[products ids="7297" columns="3"]
but I don’t want to manually change that on every single shortcode I use (and there are quite a bit). Is there a way to change the default number of coloumns used for this shortcodes?
Thanx for your help!
- The topic ‘Woocommerce Change default number of coloumns when adding products via shortcode’ is closed to new replies.