daily pastebin goal
1%
SHARE
TWEET

search

ucharles Mar 26th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * The template for displaying search results pages.
  4.  *
  5.  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
  6.  *
  7.  * @package Surface
  8.  */
  9.  
  10. get_header(); ?>
  11.  
  12.         <?php
  13.         if ( have_posts() ) : ?>
  14.  
  15.                 <h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'surface' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
  16.  
  17.             <div class="grid" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  18.             <div class="grid-sizer"></div>
  19.  
  20.             <?php
  21.             /* Start the Loop */
  22.             while ( have_posts() ) : the_post(); ?>
  23.  
  24.           <div class="grid-item">
  25.                
  26.  
  27.              <a href="<?php the_permalink(); ?>" id="loadImg"> <?php $the_post_thumbnail; ?>  
  28.  
  29.               <span> <?php echo the_post_thumbnail( 'thumbnail'); ?> </span> </a>
  30.  
  31.  
  32.             <?php   /**
  33.                  * Run the loop for the search to output the results.
  34.                  * If you want to overload this in a child theme then include a file
  35.                  * called content-search.php and that will be used instead.
  36.                  */
  37.                 get_template_part( 'template-parts/content', 'search' ); ?>
  38.  
  39.             </div>
  40.  
  41.             <?php endwhile;
  42.  
  43.         else :
  44.  
  45.             get_template_part( 'template-parts/content', 'none' );
  46.  
  47.         endif; ?>
  48.  
  49. </div>
  50.  
  51. <?php
  52. get_footer();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top