- This topic has 5 replies, 2 voices, and was last updated 10 years, 7 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘Wiz Community Support’ is closed to new topics and replies.
I have categories listed for my shop page and cannot change the number of columns using the following filter in my child theme’s function.php file:
add_filter( 'loop_shop_columns', 'wc_loop_shop_columns', 1, 10 );
function wc_loop_shop_columns( $number_columns ) {
return 2;
}
I would prefer to add a filter rather than a plug-in. Any ideas on how I can get this to work? Currently it has no effect. Thank you..
Hi Js2020,
try to use the below code and feed me back with the results
remove_filter( 'loop_shop_columns', 'leap_loop_columns', 10 );
add_filter( 'loop_shop_columns', 'wc_loop_shop_columns', 1, 10 );
function wc_loop_shop_columns( $number_columns ) {
return 2;
}
Thanks,
Bassem
No, unfortunately it didn’t work.
Hi Js2020,
Try to use the below code and feed me back with the results
function child_remove_parent_function() {
remove_filter( 'loop_shop_columns', 'leap_loop_columns', 10 );
}
add_action( 'init', 'child_remove_parent_function' );
function wc_loop_shop_columns() {
return 2;
}
add_filter( 'loop_shop_columns', 'wc_loop_shop_columns', 10 );
Thanks,
Bassem
That worked! Thanks so much,
Jennifer
Hi Jennifer,
I’m so glad 🙂 that everything is working well now.
If you liked Wiz please consider rating us at Themeforest that will be so useful for our continuity, You can Click Here to Rate us Now.
Thanks,
Bassem

Leap13 is a 5 Stars rated WordPress focused web development firm specialized in building Premium WordPress Themes and Plugins.
Enter your email and be the first to receive our latest news!
Copyright © 2025 | A Leap13 Product from LeapWorx FZ-LLC