[ Index ]

WordPress Cross Reference

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 http://codex.wordpress.org/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() ) : the_post();
  35  
  36                      /*
  37                       * Include the post format-specific template for the content. If you want to
  38                       * use this in a child theme, then include a file called called content-___.php
  39                       * (where ___ is the post format) and that will be used instead.
  40                       */
  41                      get_template_part( 'content', get_post_format() );
  42  
  43                  endwhile;
  44                  // Previous/next post navigation.
  45                  twentyfourteen_paging_nav();
  46  
  47              else :
  48                  // If no content, include the "No posts found" template.
  49                  get_template_part( 'content', 'none' );
  50  
  51              endif;
  52          ?>
  53  
  54          </div><!-- #content -->
  55      </div><!-- #primary -->
  56      <?php get_sidebar( 'content' ); ?>
  57  </div><!-- #main-content -->
  58  
  59  <?php
  60  get_sidebar();
  61  get_footer();


Generated: Tue Mar 25 01:41:18 2014 WordPress honlapkészítés: online1.hu