[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentyseventeen/ -> front-page.php (source)

   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" role="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               * Filter number of front page sections in Twenty Seventeen.
  38               *
  39               * @since Twenty Seventeen 1.0
  40               *
  41               * @param int $num_sections Number of front page sections.
  42               */
  43              $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 );
  44              global $twentyseventeencounter;
  45  
  46              // Create a setting and control for each of the sections available in the theme.
  47              for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
  48                  $twentyseventeencounter = $i;
  49                  twentyseventeen_front_page_section( null, $i );
  50              }
  51  
  52      endif; // The if ( 0 !== twentyseventeen_panel_count() ) ends here.
  53          ?>
  54  
  55      </main><!-- #main -->
  56  </div><!-- #primary -->
  57  
  58  <?php
  59  get_footer();


Generated: Thu Dec 12 01:00:04 2019 Cross-referenced by PHPXref 0.7.1