Skip to content

Instantly share code, notes, and snippets.

@ryanshoover
Created January 2, 2018 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanshoover/c167fd3b99e4d1cae43b0caca71b0a74 to your computer and use it in GitHub Desktop.
Save ryanshoover/c167fd3b99e4d1cae43b0caca71b0a74 to your computer and use it in GitHub Desktop.
Shayda's WooCommerce Tweaks
<?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