Created
August 22, 2019 02:36
-
-
Save AmeliaBriscoe/20303a23fdcb0181a96e3694ffb37cb0 to your computer and use it in GitHub Desktop.
Override the default number of products on the shop page to show all 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
<?php | |
/* | |
* Display all products on one page. | |
*/ | |
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return -1;' ), 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment