Shop page products columns separately from category page
-
Hi, guys!
I need to show 5 products columns per row on shop page and 3 on category pages
earlier I’ve used this code
function nicky_product_columns_frontend() {
if ( is_shop() ) :
return 5;
endif;
return 3;
}
add_filter('loop_shop_columns', 'nicky_product_columns_frontend', 999);
it worked
but since last theme update it doesn’t work any more
Thanks!
Hello,
Please provide your site admin access and FTP
Best Regards
Hello,
Please try this code:
function nicky_product_columns_frontend() {
if ( is_shop() ) {
woodmart_set_loop_prop( 'products_columns', 6 );
return;
}
woodmart_set_loop_prop( 'products_columns', 3 );
return;
}
add_action('woocommerce_before_shop_loop', 'nicky_product_columns_frontend', 999);
Best Regards
It works, thank you very much, Elise
Have a nice day 🙂
You are welcome! If you have any questions please feel free to contact us.
Best Regards
The topic ‘Shop page products columns separately from category page’ is closed to new replies.