[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentyten/ -> loop-page.php (source)

   1  <?php
   2  /**
   3   * The loop that displays a page
   4   *
   5   * The loop displays the posts and the post content. See
   6   * https://developer.wordpress.org/themes/basics/the-loop/ to understand it and
   7   * https://developer.wordpress.org/themes/basics/template-tags/ to understand
   8   * the tags used in it.
   9   *
  10   * This can be overridden in child themes with loop-page.php.
  11   *
  12   * @package WordPress
  13   * @subpackage Twenty_Ten
  14   * @since Twenty Ten 1.2
  15   */
  16  ?>
  17  
  18  <?php
  19  if ( have_posts() ) {
  20      while ( have_posts() ) :
  21          the_post();
  22          ?>
  23  
  24                  <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  25                      <?php if ( is_front_page() ) { ?>
  26                          <h2 class="entry-title"><?php the_title(); ?></h2>
  27                      <?php } else { ?>
  28                          <h1 class="entry-title"><?php the_title(); ?></h1>
  29                      <?php } ?>
  30  
  31                      <div class="entry-content">
  32                          <?php the_content(); ?>
  33                          <?php
  34                          wp_link_pages(
  35                              array(
  36                                  'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ),
  37                                  'after'  => '</div>',
  38                              )
  39                          );
  40                          ?>
  41                          <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
  42                      </div><!-- .entry-content -->
  43                  </div><!-- #post-<?php the_ID(); ?> -->
  44  
  45                  <?php comments_template( '', true ); ?>
  46  
  47  <?php endwhile;
  48  } // End of the loop. ?>


Generated: Tue Nov 5 01:00:02 2024 Cross-referenced by PHPXref 0.7.1