Created
November 9, 2017 10:44
-
-
Save anunay/906e035efba56f34b26c452cb939779a to your computer and use it in GitHub Desktop.
Woocommerce Products Limit Per Page
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_per_page', 'new_loop_shop_per_page', 20 ); | |
function new_loop_shop_per_page( $cols ) { | |
// $cols contains the current number of products per page based on the value stored on Options -> Reading | |
// Return the number of products you wanna show per page. | |
$cols = 12; | |
return $cols; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment