WooCommerce - Change shop loop pagination settings

lorro Nov 18th, 2016 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.   // change number of page numbers in shop loop pagination
  3.   // code goes in functions.php for your child theme
  4.   add_filter( 'woocommerce_pagination_args', 'change_pagination');
  5.   function change_pagination($args) {
  6.     // how many numbers on either the start and the end list edges
  7.     $args['end_size'] = 3;    
  8.     // how many numbers to either side of current page, but not including current page.
  9.     $args['mid_size'] = 3;
  10.     return $args;
  11.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand