3 * The front page template file
5 * If the user has selected a static page for their homepage, this is what will
7 * Learn more: https://codex.wordpress.org/Template_Hierarchy
10 * @subpackage Twenty_Seventeen
17 <div id="primary" class="content-area">
18 <main id="main" class="site-main" role="main">
20 <?php // Show the selected frontpage content.
22 while ( have_posts() ) : the_post();
23 get_template_part( 'template-parts/page/content', 'front-page' );
25 else : // I'm not sure it's possible to have no posts when this page is shown, but WTH.
26 get_template_part( 'template-parts/post/content', 'none' );
30 // Get each of our panels and show the post data.
31 if ( 0 !== twentyseventeen_panel_count() || is_customize_preview() ) : // If we have pages to show.
34 * Filter number of front page sections in Twenty Seventeen.
36 * @since Twenty Seventeen 1.0
38 * @param $num_sections integer
40 $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );
41 global $twentyseventeencounter;
43 // Create a setting and control for each of the sections available in the theme.
44 for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
45 $twentyseventeencounter = $i;
46 twentyseventeen_front_page_section( null, $i );
49 endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here. ?>
52 </div><!-- #primary -->