[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-content/themes/twentyfourteen/ -> 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_Fourteen
   9   * @since Twenty Fourteen 1.0
  10   */
  11  
  12  get_header(); ?>
  13  
  14      <section id="primary" class="content-area">
  15          <div id="content" class="site-content" role="main">
  16  
  17              <?php if ( have_posts() ) : ?>
  18  
  19              <header class="archive-header">
  20                  <h1 class="archive-title">
  21                      <?php
  22                          /*
  23                           * Queue the first post, that way we know what author
  24                           * we're dealing with (if that is the case).
  25                           *
  26                           * We reset this later so we can run the loop properly
  27                           * with a call to rewind_posts().
  28                           */
  29                          the_post();
  30  
  31                          /* translators: %s: Author display name. */
  32                          printf( __( 'All posts by %s', 'twentyfourteen' ), get_the_author() );
  33                      ?>
  34                  </h1>
  35                  <?php if ( get_the_author_meta( 'description' ) ) : ?>
  36                  <div class="author-description"><?php the_author_meta( 'description' ); ?></div>
  37                  <?php endif; ?>
  38              </header><!-- .archive-header -->
  39  
  40                  <?php
  41                      /*
  42                       * Since we called the_post() above, we need to rewind
  43                       * the loop back to the beginning that way we can run
  44                       * the loop properly, in full.
  45                       */
  46                      rewind_posts();
  47  
  48                      // Start the Loop.
  49                  while ( have_posts() ) :
  50                      the_post();
  51  
  52                      /*
  53                       * Include the post format-specific template for the content. If you want to
  54                       * use this in a child theme, then include a file called content-___.php
  55                       * (where ___ is the post format) and that will be used instead.
  56                       */
  57                      get_template_part( 'content', get_post_format() );
  58  
  59                      endwhile;
  60                      // Previous/next page navigation.
  61                      twentyfourteen_paging_nav();
  62  
  63                  else :
  64                      // If no content, include the "No posts found" template.
  65                      get_template_part( 'content', 'none' );
  66  
  67                  endif;
  68                  ?>
  69  
  70          </div><!-- #content -->
  71      </section><!-- #primary -->
  72  
  73  <?php
  74  get_sidebar( 'content' );
  75  get_sidebar();
  76  get_footer();


Generated: Fri Oct 25 08:20:01 2019 Cross-referenced by PHPXref 0.7