<?php get_header(); ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <?php if(has_post_thumbnail()){ 
        $id = get_post_thumbnail_id( get_the_ID()  ); 
        $url = wp_get_attachment_image_url($id, 'large'); } 
        else { $url = get_bloginfo('template_url').'/img/hero-image.jpg'; } ?>
    <header id="header" style="background-image:url(<?php echo $url; ?>);">
        <div class="header-info">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-xs-12 col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1">
                        <h1><?php echo 'Blog'; //$cat =get_the_category();  if($cat){ echo $cat[0]->name; } else { echo 'Blog';} ?></h1>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-12 col-md-6 col-md-offset-2 col-sm-8 col-sm-offset-1"> <!-- please note that columns classes are different than in basic subpage -->
                <div class="content">
                    <div class="blog-post">
                        <h2 class="post-title"><?php the_title(); ?></h2>
                        <p class="post-meta"><?php the_author(); ?> | <?php the_time('M. d, Y'); ?></p>
                        <div class="post-content">
                            <?php the_content(); ?>
                        </div>
                        <a href="javascript:history.go(-1);" class="italic"><strong>Back</strong></a>
                    </div>
                </div>
            </div>
            <div class="col-xs-12 col-md-2 col-sm-3">
                <?php get_sidebar(); ?>
            </div>
        </div>
    </div>

        <?php endwhile; // end of the loop. ?>


<?php get_footer(); ?>