[ XREF Home ] [ Index ]

PHP Cross Reference of WordPress Trunk

Provided by Yoast

title

Body

[close]

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

   1  <?php
   2  /**
   3   * The template for displaying Author Archive pages.
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Eleven
   7   * @since Twenty Eleven 1.0
   8   */
   9  
  10  get_header(); ?>
  11  
  12          <section id="primary">
  13              <div id="content" role="main">
  14  
  15                  <?php
  16                      /* Queue the first post, that way we know
  17                       * what date we're dealing with (if that is the case).
  18                       *
  19                       * We reset this later so we can run the loop
  20                       * properly with a call to rewind_posts().
  21                       */
  22                      if ( have_posts() )
  23                          the_post();
  24                  ?>
  25  
  26                  <header class="page-header">
  27                      <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( "ID" ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
  28                  </header>
  29  
  30                  <?php
  31                      /* Since we called the_post() above, we need to
  32                       * rewind the loop back to the beginning that way
  33                       * we can run the loop properly, in full.
  34                       */
  35                      rewind_posts();
  36                  ?>
  37  
  38                  <?php twentyeleven_content_nav( 'nav-above' ); ?>
  39  
  40                  <?php
  41                  // If a user has filled out their description, show a bio on their entries.
  42                  if ( get_the_author_meta( 'description' ) ) : ?>
  43                  <div id="author-info">
  44                      <div id="author-avatar">
  45                          <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) ); ?>
  46                      </div><!-- #author-avatar -->
  47                      <div id="author-description">
  48                          <h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
  49                          <?php the_author_meta( 'description' ); ?>
  50                      </div><!-- #author-description    -->
  51                  </div><!-- #entry-author-info -->
  52                  <?php endif; ?>
  53  
  54                  <?php /* Start the Loop */ ?>
  55                  <?php while ( have_posts() ) : the_post(); ?>
  56  
  57                      <?php
  58                          /* Include the Post-Format-specific template for the content.
  59                           * If you want to overload this in a child theme then include a file
  60                           * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  61                           */
  62                          get_template_part( 'content', get_post_format() );
  63                      ?>
  64  
  65                  <?php endwhile; ?>
  66  
  67                  <?php twentyeleven_content_nav( 'nav-below' ); ?>
  68  
  69              </div><!-- #content -->
  70          </section><!-- #primary -->
  71  
  72  <?php get_sidebar(); ?>
  73  <?php get_footer(); ?>


Generated: Wed Jun 1 08:30:02 2011 Cross-referenced by PHPXref 0.7
Provided by Yoast and awesome WordPress Hosting