/**
 * Template for displaying post/page images
 *
 * @package pgb
 */
global $post;
if (has_post_thumbnail($post->ID)) {
    $post_thumbnail_id = get_post_thumbnail_id($post->ID);
    $size = 'full';
    $attr = array('class' => 'img-responsive center-block');
    $alt_text = get_post_meta($post_thumbnail_id, '_wp_attachment_image_alt', true);
    ?>

    <?php 
    if (pgb_is_blog_page() && $post_thumbnail_id) {
        // Blog or Featured Posts pages only
        ?>


        <?php 
        echo the_post_thumbnail($size, $attr);
        ?>

    <?php 
    } else {
        // All other pages
        ?>

        <div class="entry-image col-md-12">
/**
 * Template part to display the post/page header
 *
 * @package pgb
 */
?>

<div class="col-xs-12 col-sm-12 col-md-8 col-lg-9">
	<?php 
if (is_front_page()) {
    printf('<h1 class="page-title">%s</h1>', get_bloginfo('name'));
    //printf( '<h3 class="page-sub-title">%s</h3>', get_bloginfo( 'description' ) );
} elseif (is_single() || is_page()) {
    the_title('<h1 class="page-title">', '</h1>');
    pgb_the_subtitle('<h3 class="page-sub-title">', '</h3>');
} elseif (pgb_is_blog_page()) {
    pgb_blog_page_title();
    pgb_get_the_subtitle(pgb_blog_page_id(), '<h3 class="page-sub-title">', '</h3>', true);
} elseif (is_search()) {
    printf('<h1 class="page-title">%s%s</h1>', __('Search Results for: ', 'pgb'), '<span>' . get_search_query() . '</span>');
} elseif (is_archive()) {
    if (is_category()) {
        printf('<h1 class="page-title">%s</h1>', single_cat_title('', false));
    } elseif (is_tag()) {
        printf('<h1 class="page-title">%s</h1>', single_tag_title('', false));
    } elseif (is_author()) {
        /* Queue the first post, that way we know
         * what author we're dealing with (if that is the case).
         */
        the_post();
        printf('<h1 class="page-title">%s%s</h1>', __('Author: ', 'pgb'), '<span class="vcard">' . get_the_author() . '</span>');