Last active
August 29, 2015 14:03
-
-
Save pelmered/338a70515e7bb0208673 to your computer and use it in GitHub Desktop.
WooComemrce: Change number or products
This file contains hidden or 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
//Set products per row | |
add_filter( 'loop_shop_columns', create_function( '$cols', 'return 3;' ), 20 ); | |
//Set products per page | |
add_filter( 'loop_shop_per_page', create_function( '$num', 'return 12;' ), 20 ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Two ways to use this:
Copy the code above and save it into a new file in the folder wp-content/plugins/. You can call the file what ever you want, but it's good if the filename describes the purpuse of the file, for example: WooCommerce-custom-column-count.php
Copy + Paste the code above into functions.php in your theme.
Change the return value(3) to the value you want.