<?php get_header(); ?>
    <div class="block-2">
        <div class="container">
            <div class="row">
                <?php if ( have_posts() ) : ?>
                    <?php
                    // Start the loop.
                    while ( have_posts() ) : the_post();

                        /*
                         * Include the Post-Format-specific template for the content.
                         * If you want to override this in a child theme, then include a file
                         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
                         */?>
                        <div class="col-sm-4">
                            <?php the_post_thumbnail(); ?>
                        </div>
                        <div class="col-sm-8">
                            <h2><a href="<?php echo the_permalink(); ?>"><?php echo the_title(); ?></a></h2>
                            <?php echo the_content(); ?>
                        </div>

                    <?php    // End the loop.
                    endwhile;

                    // Previous/next page navigation.
                    the_posts_pagination( array(
                        'prev_text'          => __( 'Previous page', 'ExpenseBlog' ),
                        'next_text'          => __( 'Next page', 'ExpenseBlog' ),
                        'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'ExpenseBlog' ) . ' </span>',
                    ) );
                    // If comments are open or we have at least one comment, load up the comment template.
                    if ( comments_open() || get_comments_number() ) :
                        comments_template();
                    endif;
// If no content, include the "No posts found" template.
                else :
                    get_template_part( 'content', 'none' );

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