<?php
 /**
   * The template for Shop.
   *
   *
   * @package   igor WordPress Theme
   * @copyright Copyright (C) 2016, OrdaSoft
   * @license  http://www.gnu.org/licenses/gpl-2.0.html  GNU General Public License v2 or later
   * @author    AUTHOR <www.ordasoft.com>
   * igor is distributed under the terms of the GNU GPL
   */
$posts_per_page = get_theme_mod( 'igor_products_show', '2' );
$args=array(
    'post_type' => 'product',
    'post_status' => 'publish',
    'posts_per_page' => $posts_per_page,
    'product_tag' => array( 'home' ),
//    'product_cat' => 'home'
);



$my_products = null;
$my_products = new WP_Query($args);
if( $my_products->have_posts() ) {
$position = 0;
while( $my_products->have_posts() ){ $my_products->the_post();
if ( $position % 1==0 ) {
         $position++;
        if ($position != 0 and $position % 1==0) { ?>
        <section class="product-item <?php if ($position != 0 and $position%2==0) :
                                                    echo 'right-product';
                                                    else :
                                                    echo 'left-product';
                                                    endif;?>" >
        <?php }

    get_template_part( 'template-parts/content', 'product' ); ?>
    </section>
<?php }
}
wp_reset_query();
} else {
    get_template_part( 'template-parts/content', 'none' );
} ?>