[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * The front page template file 4 * 5 * If the user has selected a static page for their homepage, this is what will 6 * appear. 7 * Learn more: https://developer.wordpress.org/themes/basics/template-hierarchy/ 8 * 9 * @package WordPress 10 * @subpackage Twenty_Seventeen 11 * @since Twenty Seventeen 1.0 12 * @version 1.0 13 */ 14 15 get_header(); ?> 16 17 <div id="primary" class="content-area"> 18 <main id="main" class="site-main"> 19 20 <?php 21 // Show the selected front page content. 22 if ( have_posts() ) : 23 while ( have_posts() ) : 24 the_post(); 25 get_template_part( 'template-parts/page/content', 'front-page' ); 26 endwhile; 27 else : 28 get_template_part( 'template-parts/post/content', 'none' ); 29 endif; 30 ?> 31 32 <?php 33 // Get each of our panels and show the post data. 34 if ( 0 !== twentyseventeen_panel_count() || is_customize_preview() ) : // If we have pages to show. 35 36 /** 37 * Filters the number of front page sections in Twenty Seventeen. 38 * 39 * @since Twenty Seventeen 1.0 40 * 41 * @global int|string $twentyseventeencounter Front page section counter. 42 * 43 * @param int $num_sections Number of front page sections. 44 */ 45 $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 ); 46 global $twentyseventeencounter; 47 48 // Create a setting and control for each of the sections available in the theme. 49 for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) { 50 $twentyseventeencounter = $i; 51 twentyseventeen_front_page_section( null, $i ); 52 } 53 54 endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here. 55 ?> 56 57 </main><!-- #main --> 58 </div><!-- #primary --> 59 60 <?php 61 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 |