[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

   1  <?php
   2  /**
   3   * The default template for displaying content
   4   *
   5   * Used for both single and index/archive/search.
   6   *
   7   * @package WordPress
   8   * @subpackage Twenty_Fourteen
   9   * @since Twenty Fourteen 1.0
  10   */
  11  
  12  ?>
  13  
  14  <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  15      <?php twentyfourteen_post_thumbnail(); ?>
  16  
  17      <header class="entry-header">
  18          <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ), true ) && twentyfourteen_categorized_blog() ) : ?>
  19          <div class="entry-meta">
  20              <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
  21          </div>
  22              <?php
  23              endif;
  24  
  25          if ( is_single() ) :
  26              the_title( '<h1 class="entry-title">', '</h1>' );
  27              else :
  28                  the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
  29              endif;
  30              ?>
  31  
  32          <div class="entry-meta">
  33              <?php
  34              if ( 'post' === get_post_type() ) {
  35                  twentyfourteen_posted_on();
  36              }
  37  
  38              if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
  39                  ?>
  40              <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
  41                  <?php
  42                  endif;
  43  
  44                  edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
  45              ?>
  46          </div><!-- .entry-meta -->
  47      </header><!-- .entry-header -->
  48  
  49      <?php if ( is_search() ) : ?>
  50      <div class="entry-summary">
  51          <?php the_excerpt(); ?>
  52      </div><!-- .entry-summary -->
  53      <?php else : ?>
  54      <div class="entry-content">
  55          <?php
  56              the_content(
  57                  sprintf(
  58                      /* translators: %s: Post title. Only visible to screen readers. */
  59                      __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ),
  60                      the_title( '<span class="screen-reader-text">', '</span>', false )
  61                  )
  62              );
  63  
  64              wp_link_pages(
  65                  array(
  66                      'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
  67                      'after'       => '</div>',
  68                      'link_before' => '<span>',
  69                      'link_after'  => '</span>',
  70                  )
  71              );
  72          ?>
  73      </div><!-- .entry-content -->
  74      <?php endif; ?>
  75  
  76      <?php the_tags( '<footer class="entry-meta"><span class="tag-links">', '', '</span></footer>' ); ?>
  77  </article><!-- #post-<?php the_ID(); ?> -->


Generated : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref