Merge pull request #1917 from swicks/master
loop_shop_columns to support one product per column
This commit is contained in:
commit
abc0f80a2c
|
@ -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' ); ?>
|
||||
|
|
|
@ -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 ); ?>
|
||||
|
|
Loading…
Reference in New Issue