Created
January 2, 2018 22:23
-
-
Save ryanshoover/c167fd3b99e4d1cae43b0caca71b0a74 to your computer and use it in GitHub Desktop.
Shayda's WooCommerce Tweaks
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 | |
/** | |
* Plugin Name: Shayda's WooCommerce Tweaks | |
* Plugin URI: http://dinewithshayda.com | |
* Description: Makes WooCommerce do what Shayda demands it should do. | |
* Version: 1.0 | |
* Author: shayda | |
* Author URI: http://dinewithshayda.com | |
* | |
* @package woocommerce-shayda | |
*/ | |
/** | |
* Change the number of products that should show on the shop page. | |
* | |
* @link https://docs.woocommerce.com/document/change-number-of-products-displayed-per-page/ | |
* @param int $cols Default number of products | |
* @return int Our new number of products | |
*/ | |
function shayda_loop_shop_per_page( $cols ) { | |
$cols = 9; | |
return $cols; | |
} | |
add_filter( 'loop_shop_per_page', 'shayda_loop_shop_per_page', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment