Skip to content

Instantly share code, notes, and snippets.

@anunay
Created November 9, 2017 10:43
Show Gist options
  • Save anunay/245c85095a89b26fdeb21a1b9f900d27 to your computer and use it in GitHub Desktop.
Save anunay/245c85095a89b26fdeb21a1b9f900d27 to your computer and use it in GitHub Desktop.
Woocommerce Display 3 Products in a Row
<?php
add_filter( 'loop_shop_columns', 'wc_loop_shop_columns', 1, 10 );
/*
* Return a new number of maximum columns for shop archives
* @param int Original value
* @return int New number of columns
*/
function wc_loop_shop_columns( $number_columns ) {
return 3;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment