[ Index ] |
PHP Cross Reference of WordPress |
[Summary view] [Print] [Text view]
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 WordPress 8 * @subpackage Twenty_Nineteen 9 * @since Twenty Nineteen 1.0 10 */ 11 12 get_header(); 13 ?> 14 15 <div id="primary" class="content-area"> 16 <main id="main" class="site-main"> 17 18 <?php if ( have_posts() ) : ?> 19 20 <header class="page-header"> 21 <h1 class="page-title"> 22 <?php _e( 'Search results for: ', 'twentynineteen' ); ?> 23 <span class="page-description"><?php echo get_search_query(); ?></span> 24 </h1> 25 </header><!-- .page-header --> 26 27 <?php 28 // Start the Loop. 29 while ( have_posts() ) : 30 the_post(); 31 32 /* 33 * Include the Post-Format-specific template for the content. 34 * If you want to override this in a child theme, then include a file 35 * called content-___.php (where ___ is the Post Format name) and that 36 * will be used instead. 37 */ 38 get_template_part( 'template-parts/content/content', 'excerpt' ); 39 40 // End the loop. 41 endwhile; 42 43 // Previous/next page navigation. 44 twentynineteen_the_posts_navigation(); 45 46 // If no content, include the "No posts found" template. 47 else : 48 get_template_part( 'template-parts/content/content', 'none' ); 49 50 endif; 51 ?> 52 </main><!-- #main --> 53 </div><!-- #primary --> 54 55 <?php 56 get_footer();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |