<?php
$published_posts = wp_count_posts()->publish;
$posts_per_page = 3;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

$args=array(
    'paged'=>$paged,
    'posts_per_page'=>$posts_per_page,
    'tax_query' => array(
        array(
            'taxonomy' => 'post_format',
            'field' => 'slug',
            'terms' => array('post-format-audio','post-format-video','post-format-gallery','post-format-image','post-format-aside'),
            'operator' => 'NOT IN'
        )
    ),
    'category_name' => 'Home'
);



$igor_query = null;
$igor_query = new WP_Query($args);
    if( $igor_query->have_posts() ) {
    $position = 0;
    while( $igor_query->have_posts() ){ $igor_query->the_post();
        if ( $position % 1==0 ) {
        $image_id = get_post_thumbnail_id();
        $image_url = wp_get_attachment_image_src($image_id,800,800);
        $image_url = $image_url[0];
         $position++;
        if ($position != 0 and $position % 1==0) { ?>
        <section class="loop-item <?php if ($position != 0 and $position%2==0) :
                                                    echo 'two-posts';
                                                    elseif($position != 0 and $position%3==0) :
                                                    echo 'tree-posts';
                                                    else :
                                                    echo 'one-posts';
                                                    endif;?>" style="background: url(<?php echo "$image_url"; ?>)">
        <?php } ?>

            <?php get_template_part( 'template-parts/content', get_post_format() ); ?>

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