[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-content/themes/twentyfourteen/ -> index.php (source)

   1  <?php
   2  /**
   3   * The main template file
   4   *
   5   * This is the most generic template file in a WordPress theme and one
   6   * 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_Fourteen
  14   * @since Twenty Fourteen 1.0
  15   */
  16  
  17  get_header(); ?>
  18  
  19  <div id="main-content" class="main-content">
  20  
  21  <?php
  22  if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
  23      // Include the featured content template.
  24      get_template_part( 'featured-content' );
  25  }
  26  ?>
  27  
  28      <div id="primary" class="content-area">
  29          <div id="content" class="site-content" role="main">
  30  
  31          <?php
  32          if ( have_posts() ) :
  33              // Start the Loop.
  34              while ( have_posts() ) :
  35                  the_post();
  36  
  37                  /*
  38                   * Include the post format-specific template for the content. If you want to
  39                   * use this in a child theme, then include a file called content-___.php
  40                   * (where ___ is the post format) and that will be used instead.
  41                   */
  42                  get_template_part( 'content', get_post_format() );
  43  
  44                  endwhile;
  45              // Previous/next post navigation.
  46              twentyfourteen_paging_nav();
  47  
  48              else :
  49                  // If no content, include the "No posts found" template.
  50                  get_template_part( 'content', 'none' );
  51  
  52              endif;
  53              ?>
  54  
  55          </div><!-- #content -->
  56      </div><!-- #primary -->
  57      <?php get_sidebar( 'content' ); ?>
  58  </div><!-- #main-content -->
  59  
  60  <?php
  61  get_sidebar();
  62  get_footer();


Generated: Fri Oct 25 08:20:01 2019 Cross-referenced by PHPXref 0.7