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


Generated : Mon Mar 18 08:20:01 2024 Cross-referenced by PHPXref