<?php get_header();
?>
<div class = 'blog'>
<div class = 'container'>
<div class = 'row'>
<div class = 'col-12 col-md-8'>
<?php while ( have_posts() ) {
    the_post();
    ?>
    <div class = 'contetn_single single-box'>
    <div class = 'title_single'>
    <h2><?php the_title();
    ?></h2>
    </div>
    <div class = 'dital_single'>
    <i class = 'fa fa-heart'></i>
    <span><?php the_views();
    ?> </span>
    <i class = 'fa fa-comments'></i>
    <span><?php comments_popup_link( 'بدون نظر', '1 دیدگاه', '% دیدگاه', '', 'دیدگاه بسته است' );
    ?></span>
    </div>
    <div class = 'clearfix'></div>
    <div class = 'img_single'>
    <img src = '<?php the_post_thumbnail_url(); ?>' alt = '<?php the_title(); ?> '>
    </div>
    <p> <?php the_content();
    ?></p>
    </div>
    <?php }
    ?>
<div class="clearfix"></div>
<div class="wp-pagenavi">
<ul class="pagination">
  <!--  <li class="page-item"><a class="page-link" href="#">Previous</a></li>
    <li class="page-item"><a class="page-link" href="#">1</a></li>
    <li class="page-item active"><a class="page-link" href="#">2</a></li>
    <li class="page-item"><a class="page-link" href="#">3</a></li>
    <li class="page-item"><a class="page-link" href="#">Next</a></li>-->
    <?php wp_pagenavi(); ?>

  </ul>
</div>
    <section>
    <div class = 'comments_single'>
    <?php comments_template();
    ?>
    </div>
    </section>

    </div>

    <?php get_sidebar();
    ?>
    </div>
    </div>
    </div>
    </div>
    <?php get_footer();
    ?>