Created
July 12, 2021 15:24
-
-
Save jorpdesigns/b40a430abdc7afa981bdc56388f3e76b to your computer and use it in GitHub Desktop.
Snippet to set number of products per page and per row on WooCommerce archives
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 | |
// SETS NUMBER OF PRODUCTS DISPLAYED PER PAGE | |
add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 9999 ); | |
function new_loop_shop_per_page( $cols ) { | |
$cols = 30; | |
return $cols; | |
} | |
// SETS NUMBER OF PRODUCTS DISPLAYED PER ROW | |
add_filter('loop_shop_columns', 'loop_columns'); | |
function loop_columns() { | |
return 3; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment