<?php
/**
 * The template for displaying search results pages
 *
 * @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 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">
          <h2></h2>
          <!--<h6> </h6>-->
        </div>
      </div>
    </div>
      </section>

	<section id="inner-page-1">
        <div class="container">
            <div class="row">
                <div class="col-sm-8">
      
                	<div class="blog-container">
					         <?php if ( have_posts() ) : ?>
			 <?php  _e("<h2 style='font-weight:bold;color: #949494;font-size: 22px;margin-bottom: 30px;'>Search Results for: ".get_query_var('s')."</h2>"); ?>
		<?php else : ?>
			<h2 class="site---search" style='font-weight:bold;color:#000'>Nothing Found</h2>
						<div class="alert alert-info">
						  <p>Sorry, but nothing matched your search criteria. Please try again with some different keywords.</p>
						
						</div>
		<?php endif; ?>
					
					<?php while ( have_posts() ) : the_post(); ?>
                    	<article class="blog-post">
                        	<div class="blog-heading"><?php the_title();?></div>
                            <div class="row">
              <div class="col-sm-7 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-sm-5">
        
              <?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"/></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"/></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"/></a></li>
                                       
                                    </ul></div></div> 
							<?php if ( has_post_thumbnail() ) { 
					
					$image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $postData->ID ),'full' ); 
					
					$imgID  = get_post_thumbnail_id($post->ID);
					$imgAlt = get_post_meta($imgID,'_wp_attachment_image_alt', true);
					
					?>
							
					<div class="row">					
                            <div class="col-lg-4 col-sm-12">
                            <figure class="blog-post-img"><img src="<?php echo $image_url[0];?>"   alt="<?php echo $imgAlt; ?>" class="img-fluid"/>	
                            </figure> 
                        </div>
                           
<?php } ?>
  <?php// echo substr(the_excerpt(),0,200); ?>
                            <div class="col-lg-8 col-sm-12">
<?php  the_excerpt() ; ?>
                           
					<p><a class="btn btn-read-more" href="<?php the_permalink(); ?>">Read more</a></p>
                            </div>  
                            </div>
                        </article>
						<?php  endwhile;?>   
                    </div>
					
           </div>
                
              
                 <?php get_sidebar('blog'); ?> 
            </div>
            
        </div>
    </section>
<?php get_footer(); ?>
