[ Index ]

WordPress Cross Reference

title

Body

[close]

/wp-content/themes/twentytwelve/ -> 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_Twelve
   9   * @since Twenty Twelve 1.0
  10   */
  11  ?>
  12  
  13      <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  14          <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
  15          <div class="featured-post">
  16              <?php _e( 'Featured post', 'twentytwelve' ); ?>
  17          </div>
  18          <?php endif; ?>
  19          <header class="entry-header">
  20              <?php the_post_thumbnail(); ?>
  21              <?php if ( is_single() ) : ?>
  22              <h1 class="entry-title"><?php the_title(); ?></h1>
  23              <?php else : ?>
  24              <h1 class="entry-title">
  25                  <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
  26              </h1>
  27              <?php endif; // is_single() ?>
  28              <?php if ( comments_open() ) : ?>
  29                  <div class="comments-link">
  30                      <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
  31                  </div><!-- .comments-link -->
  32              <?php endif; // comments_open() ?>
  33          </header><!-- .entry-header -->
  34  
  35          <?php if ( is_search() ) : // Only display Excerpts for Search ?>
  36          <div class="entry-summary">
  37              <?php the_excerpt(); ?>
  38          </div><!-- .entry-summary -->
  39          <?php else : ?>
  40          <div class="entry-content">
  41              <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
  42              <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
  43          </div><!-- .entry-content -->
  44          <?php endif; ?>
  45  
  46          <footer class="entry-meta">
  47              <?php twentytwelve_entry_meta(); ?>
  48              <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
  49              <?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
  50                  <div class="author-info">
  51                      <div class="author-avatar">
  52                          <?php
  53                          /** This filter is documented in author.php */
  54                          $author_bio_avatar_size = apply_filters( 'twentytwelve_author_bio_avatar_size', 68 );
  55                          echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
  56                          ?>
  57                      </div><!-- .author-avatar -->
  58                      <div class="author-description">
  59                          <h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
  60                          <p><?php the_author_meta( 'description' ); ?></p>
  61                          <div class="author-link">
  62                              <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  63                                  <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentytwelve' ), get_the_author() ); ?>
  64                              </a>
  65                          </div><!-- .author-link    -->
  66                      </div><!-- .author-description -->
  67                  </div><!-- .author-info -->
  68              <?php endif; ?>
  69          </footer><!-- .entry-meta -->
  70      </article><!-- #post -->


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