[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentythirteen/ -> author.php (source)

   1  <?php
   2  /**
   3   * The template for displaying Author archive pages
   4   *
   5   * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
   6   *
   7   * @package WordPress
   8   * @subpackage Twenty_Thirteen
   9   * @since Twenty Thirteen 1.0
  10   */
  11  
  12  get_header(); ?>
  13  
  14      <div id="primary" class="content-area">
  15          <div id="content" class="site-content" role="main">
  16  
  17          <?php if ( have_posts() ) : ?>
  18  
  19              <?php
  20                  /*
  21                   * Queue the first post, that way we know what author
  22                   * we're dealing with (if that is the case).
  23                   *
  24                   * We reset this later so we can run the loop
  25                   * properly with a call to rewind_posts().
  26                   */
  27                  the_post();
  28              ?>
  29  
  30              <header class="archive-header">
  31                  <h1 class="archive-title">
  32                  <?php
  33                  /* translators: %s: Author display name. */
  34                  printf( __( 'All posts by %s', 'twentythirteen' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" rel="me">' . get_the_author() . '</a></span>' );
  35                  ?>
  36                  </h1>
  37              </header><!-- .archive-header -->
  38  
  39              <?php
  40                  /*
  41                   * Since we called the_post() above, we need
  42                   * to rewind the loop back to the beginning.
  43                   * That way we can run the loop properly, in full.
  44                   */
  45                  rewind_posts();
  46              ?>
  47  
  48              <?php if ( get_the_author_meta( 'description' ) ) : ?>
  49                  <?php get_template_part( 'author-bio' ); ?>
  50              <?php endif; ?>
  51  
  52              <?php
  53              // Start the loop.
  54              while ( have_posts() ) :
  55                  the_post();
  56                  ?>
  57                  <?php get_template_part( 'content', get_post_format() ); ?>
  58              <?php endwhile; ?>
  59  
  60              <?php twentythirteen_paging_nav(); ?>
  61  
  62          <?php else : ?>
  63              <?php get_template_part( 'content', 'none' ); ?>
  64          <?php endif; ?>
  65  
  66          </div><!-- #content -->
  67      </div><!-- #primary -->
  68  
  69  <?php get_sidebar(); ?>
  70  <?php get_footer(); ?>


Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref