Advertisement
vapvarun

search results

Jul 12th, 2020
1,422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.24 KB | None | 0 0
  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 Reign
  8.  */
  9. get_header();
  10. ?>
  11.  
  12. <?php //do_action( 'wbcom_before_content_section' ); ?>
  13.  
  14. <div class="content-wrapper">
  15.      <main id="main" class="site-main" role="main" style="padding: 20px 10px;">
  16.             <?php get_search_form(); ?>
  17.         </main><!-- #main -->
  18.     <?php if ( have_posts() ) : ?>
  19.  
  20.         <!-- <header class="page-header">
  21.             <h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'reign' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
  22.         </header> --><!-- .page-header -->
  23.  
  24.         <?php
  25.         /* Start the Loop */
  26.         while ( have_posts() ) : the_post();
  27.  
  28.             /**
  29.              * Run the loop for the search to output the results.
  30.              * If you want to overload this in a child theme then include a file
  31.              * called content-search.php and that will be used instead.
  32.              */
  33.             get_template_part( 'template-parts/content', 'search' );
  34.  
  35.         endwhile;
  36.  
  37.         reign_custom_post_navigation();
  38.  
  39.     else :
  40.  
  41.         get_template_part( 'template-parts/content', 'none' );
  42.  
  43.     endif;
  44.     ?>
  45.  
  46. </div>
  47.  
  48. <?php //do_action( 'wbcom_after_content_section' ); ?>
  49.  
  50. <?php
  51. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement