<?php get_header();?>
    <div class="container">
        <div class="row">
            <div class="col-md-8">
                <?php if(have_posts()):?>
                    <?php while(have_posts()) : the_post()?>
                        <div class="post">
                            <div class="post-image">
                                <?php the_post_thumbnail();?>
                            </div>
                            <div class="post-data p-1">
                                <p class="text-danger mt-2"> Par: <?php the_author();?> le: <?php the_time('F j,Y g:i a');?></p>
                            </div>
                            <h3 class="post-title text-primary"><?php the_title();?></h3>
                            <p class="post-body"><?php the_content();?></p>
                        </div>
                    <?php endwhile;?>
                    <?php comments_template();?>
                <?php else :?>
                    <?php echo wpautop('Aucun résultat trouvé');?>
                <?php endif;?>
            </div>
            <div class="col-md-4 sidebar">
                <?php get_sidebar();?>
            </div>
        </div>
    </div>
<?php get_footer();?>
