[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * The main template file 4 * 5 * This is the most generic template file in a WordPress theme 6 * and one of the two required files for a theme (the other being style.css). 7 * It is used to display a page when nothing more specific matches a query. 8 * E.g., it puts together the home page when no home.php file exists. 9 * 10 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ 11 * 12 * @package WordPress 13 * @subpackage Twenty_Nineteen 14 * @since Twenty Nineteen 1.0 15 */ 16 17 get_header(); 18 ?> 19 20 <div id="primary" class="content-area"> 21 <main id="main" class="site-main"> 22 23 <?php 24 if ( have_posts() ) { 25 26 // Load posts loop. 27 while ( have_posts() ) { 28 the_post(); 29 get_template_part( 'template-parts/content/content' ); 30 } 31 32 // Previous/next page navigation. 33 twentynineteen_the_posts_navigation(); 34 35 } else { 36 37 // If no content, include the "No posts found" template. 38 get_template_part( 'template-parts/content/content', 'none' ); 39 40 } 41 ?> 42 43 </main><!-- .site-main --> 44 </div><!-- .content-area --> 45 46 <?php 47 get_footer();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |