[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentyfourteen/ -> search.php (source)

   1  <?php
   2  /**
   3   * The template for displaying Search Results pages
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Fourteen
   7   * @since Twenty Fourteen 1.0
   8   */
   9  
  10  get_header(); ?>
  11  
  12      <section id="primary" class="content-area">
  13          <div id="content" class="site-content" role="main">
  14  
  15              <?php if ( have_posts() ) : ?>
  16  
  17              <header class="page-header">
  18                  <h1 class="page-title">
  19                  <?php
  20                  /* translators: %s: Search query. */
  21                  printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() );
  22                  ?>
  23                  </h1>
  24              </header><!-- .page-header -->
  25  
  26                  <?php
  27                  // Start the Loop.
  28                  while ( have_posts() ) :
  29                      the_post();
  30  
  31                      /*
  32                       * Include the post format-specific template for the content. If you want
  33                       * to use this in a child theme, then include a file called content-___.php
  34                       * (where ___ is the post format) and that will be used instead.
  35                       */
  36                      get_template_part( 'content', get_post_format() );
  37  
  38                      endwhile;
  39                      // Previous/next post navigation.
  40                      twentyfourteen_paging_nav();
  41  
  42                  else :
  43                      // If no content, include the "No posts found" template.
  44                      get_template_part( 'content', 'none' );
  45  
  46                  endif;
  47                  ?>
  48  
  49          </div><!-- #content -->
  50      </section><!-- #primary -->
  51  
  52  <?php
  53  get_sidebar( 'content' );
  54  get_sidebar();
  55  get_footer();


Generated: Sun Nov 24 01:00:02 2024 Cross-referenced by PHPXref 0.7.1