Created
February 15, 2014 22:39
-
-
Save coenjacobs/9026180 to your computer and use it in GitHub Desktop.
Change the number of columns in which products will be shown on product archives
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'loop_shop_columns', 'wc_loop_shop_columns', 1, 10 ); | |
/* | |
* Return a new number of maximum columns for shop archives | |
* @param int Original value | |
* @return int New number of columns | |
*/ | |
function wc_loop_shop_columns( $number_columns ) { | |
return 2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment