<?php
/**
 * Template Name: Blog Right Sidebar
 *
 */
get_header();  ?>
<!--==================== newses breadcrumb section ====================-->
<?php get_template_part('index','banner'); ?>
  <!--==================== main content section ====================-->
<main id="content" class="container">
    <!--col-md-8-->
    <div class="col-md-8 col-sm-8">
      <!--row-->
      <div class="row">
        <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
                          $args = array( 'post_type' => 'post','paged'=>$paged,'posts_per_page' => '6');    
                          $post_type_data = new WP_Query( $args );
                          while($post_type_data->have_posts()){
                          $post_type_data->the_post();
                          global $more;
                          $more = 0; ?>
        <!--col-md-12-->
        <div class="col-md-12 pulse animated">
          <div class="mg-blog-post-box">
            <?php $url = newses_get_freatured_image_url($post->ID, 'full'); ?>
            <div class="mg-blog-thumb md back-img" style="background-image: url('<?php echo esc_url($url); ?>');">
              <a href="<?php the_permalink(); ?>" class="link-div"></a>
              <div class="mg-blog-category">
                <?php newses_post_categories(); ?>
              </div>
              <span class="post-form"><i class="fa fa-camera"></i></span>
            </div>
            <article class="small px-0 mt-2">
              <h4 class="title"> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute( array('before' => 'Permalink to: ','after'  => '') ); ?>"> <?php the_title(); ?></a> </h4>
                  <?php newses_post_meta(); ?>
            </article>
          </div>
        </div>
        <!--/col-md-12-->
        <?php } ?>
      </div>
    </div>
    <aside class="col-md-4 col-sm-4">
         <?php get_sidebar();?>
    </aside>
        <div class="col-md-12 text-center">
          <?php $newses_pagination = new newses_pagination();
                $newses_pagination->newses_page($paged, $post_type_data); ?>
        </div>
      </div>
      <!--/row-->
</div>
<!--/container-->
</main>
<?php get_footer();?>