Skip to content

Instantly share code, notes, and snippets.

@dr5hn
Created October 15, 2017 08:53
Show Gist options
  • Save dr5hn/7a6a61a36aaa160a80233bf19a536882 to your computer and use it in GitHub Desktop.
Save dr5hn/7a6a61a36aaa160a80233bf19a536882 to your computer and use it in GitHub Desktop.
How to change number of products displayed on Shop Archive Page Woocommerce
<?php
//Change Number of Products Display on Shop Archive Page -- By Darshan Gada
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 = 100;
return $cols;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment