Last active
March 8, 2025 09:34
-
-
Save jameskoster/1601682 to your computer and use it in GitHub Desktop.
WooCommerce - change number of products displayed 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
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 = 9; | |
return $cols; | |
} |
@nagpai figured it out!
It's the Jetpack "default" setting that isn't the default setting.
This removes the "More Products" and shows all products per Category
Workaround for now is to Get to Jetpack settings and set Infinite scroll settings
Writing tab
Load more posts using the default theme behaviour
(the default has the 2nd radial check)
https://user-images.githubusercontent.com/4162931/101133960-a8e6e880-362f-11eb-8a01-8bbc9c9d7746.jpg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@nagpai figured it out!
It's the Jetpack "default" setting that isn't the default setting.
This removes the "More Products" and shows all products per Category
Workaround for now is to Get to Jetpack settings and set Infinite scroll settings
Writing tab
Load more posts using the default theme behaviour
(the default has the 2nd radial check)
https://user-images.githubusercontent.com/4162931/101133960-a8e6e880-362f-11eb-8a01-8bbc9c9d7746.jpg