<?php
/**
 * The template for displaying all single posts and attachments
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */

get_header(); ?>
 <section class="innr-bnnr blog-bnnr">
         <div class="bnnr-img">  <img src="<?php bloginfo('template_directory'); ?>/img/blog-banner.jpg" alt="" class="img-fluid"></div>
		  <div class="bnnr-contnt">
      <div class="container">
        <div class="row">
          <h2><?php the_title();?></h2>
          <h6><a href="/blog">Blog</a> | <?php the_title();?> </h6>
        </div>
      </div>
    </div>
      </section>
	  

<section id="inner-page1">
        <div class="container">
            <div class="row">
                <div class="col-sm-8">
                     
                	<div class="blog-container">
					<?php while ( have_posts() ) : the_post(); ?>
                    	<article class="blog-post">
                        	<div class="blog-heading"><h1><?php the_title();?></h1></div>
                             
							<div class="row">
							<div class="col-sm-7 author">
							 <ul class="breadcrumb blog-post-breadcrumb">
							  <?php $author_id=$post->post_author; ?>
							
							<li>Posted by Blake Mortage </li>
							<li>/</li>
                               <li><?php the_time( get_option( 'date_format' ) ); ?></li>
                            </ul> 
							</div>
							<div class="col-sm-5">
				
							
							<ul class="social-link-list share-links"><li><a class="fb" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" target="blank"><img src="<?php bloginfo('template_directory'); ?>/img/facebook.png" alt="Scottsdale Mortgage Facebook "/></a></li>
                                       
                                        <li><a class="linkdn"href="https://www.linkedin.com/shareArticle?mini=true&url=&title=&summary=&source=<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" target="blank"><img src="<?php bloginfo('template_directory'); ?>/img/linkedin.png" alt="Scottsdale Mortgage Linkedin"/></a></li>
                                        <li><a class="tweet" href="https://twitter.com/intent/tweet?url=<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>" target="blank"><img src="<?php bloginfo('template_directory'); ?>/img/twitter.png" alt="Scottsdale Mortgage Twitter"/></a></li>
                                    </ul></div></div>
				<?php if ( has_post_thumbnail() ) { 
					
					$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'Small' );
					$imgID  = get_post_thumbnail_id($post->ID);
					$imgAlt = get_post_meta($imgID,'_wp_attachment_image_alt', true);
					?>	
							
						
                            <figure class="inner-blog-post-img">	<img src="<?php echo $large_image_url[0];?>"   alt="<?php echo $imgAlt;?>" class="img-fluid"/>
                            </figure> 
								 <?php }
								 ?>
                          <?php echo the_content(); ?>
                                            
                        </article>
						<?php  endwhile;?>   
                    </div>
                </div>
                
              
                  <?php get_sidebar('blog'); ?>
            </div>
            
        </div>
    </section>
<?php get_footer(); ?>
