<?php 
/*template name: blog*/
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 mobile-image-view">
			<img src="<?php bloginfo('template_directory'); ?>/img/blog-banner-1.jpg" alt="" class="img-fluid mobile-res">
		 </div>
		  <div class="bnnr-contnt">
      <div class="container">
        <div class="row">
          <h1><?php the_title();?></h1>
          <h6><?php simple_breadcrumbs(); ?> </h6>
        </div>
      </div>
    </div>
      </section>
     <section id="inner-page1">
        <div class="container">
            <div class="row">
                <div class="col-md-8">
                	<div class="blog-container">
					<?php
							  if ( get_query_var('paged') ) {
   $paged = get_query_var('paged');
  } elseif ( get_query_var('page') ) {
   $paged = get_query_var('page');
  } else {
   $paged = 1;
  }?>
		        	<?php query_posts('post_type=post&post_status=publish&posts_per_page=2&paged='.$paged); ?>
					<?php while ( have_posts() ) : the_post(); ?>
                    	<article class="blog-post">
                        	<div class="blog-heading"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></div>
                           <div class="row">
							<div class="col-md-8 author">
							 <ul class="breadcrumb blog-post-breadcrumb">
					<li>Posted by Blake Mortage  </li>
					<li>/</li>
                               <li><?php the_time( get_option( 'date_format' ) ); ?></li>
                            </ul> 
							</div>
							<div class="col-md-4 socl-ar">
				
							<?php //echo do_shortcode("[social_share_button]"); ?>
							<ul class="social-link-list share-links"><li><a class="fb" href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" 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 the_permalink(); ?>" 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 the_permalink(); ?>" 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( $postData->ID ), 'Small' );
					?>		<div class="row">					
                            <div class="col-lg-4 col-sm-12">
                            <figure class="blog-post-img"><?php echo the_post_thumbnail( 'full', array( 'class' => 'img-fluid' ) ); ?>
                                </figure>   <?php }else{ ?>
								<a href="<?php echo the_permalink(); ?>"><img  src="/wp-content/themes/blakemortgage/img/article-img1.jpg"   alt="" class="img-fluid"/></a>
 <?php	} ?>	
 </div>
                            
                            <div class="col-lg-8 col-sm-12">
							                   <?php echo substr(get_the_content(),0,250); ?> ...
                            <p><a class="btn btn-read-more" href="<?php the_permalink(); ?>">Read more</a></p>                    
                            </div>
                            </div>
                        </article>
                        <?php  endwhile;?>	
        
                    </div>
            
                     <?php wpbeginner_numeric_posts_nav(); ?> 
               
                </div>
                
              
        <?php get_sidebar('blog'); ?>
            </div>
            
        </div>
    </section>
<?php
get_footer() ; ?>