Merge pull request #1917 from swicks/master

loop_shop_columns to support one product per column
This commit is contained in:
Mike Jolley 2012-12-05 05:05:52 -08:00
commit abc0f80a2c
2 changed files with 4 additions and 4 deletions

View File

@ -29,10 +29,10 @@ if ( ! $product->is_visible() )
$woocommerce_loop['loop']++;
?>
<li class="product<?php
if ( ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] == 0 || $woocommerce_loop['columns'] == 1)
echo ' first';
if ( $woocommerce_loop['loop'] % $woocommerce_loop['columns'] == 0 )
echo ' last';
elseif ( ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] == 0 )
echo ' first';
?>">
<?php do_action( 'woocommerce_before_shop_loop_item' ); ?>

View File

@ -25,10 +25,10 @@ if ( empty( $woocommerce_loop['columns'] ) )
$woocommerce_loop['loop']++;
?>
<li class="product <?php
if ( ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] == 0 || $woocommerce_loop['columns'] == 1)
echo 'first';
if ( $woocommerce_loop['loop'] % $woocommerce_loop['columns'] == 0 )
echo 'last';
elseif ( ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] == 0 )
echo 'first';
?>">
<?php do_action( 'woocommerce_before_subcategory', $category ); ?>