[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  <?php
   2  /**
   3   * The template for displaying Author Archive pages.
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Twelve
   7   * @since Twenty Twelve 1.0
   8   */
   9  
  10  get_header(); ?>
  11  
  12      <section id="primary">
  13          <div id="content" role="main">
  14  
  15          <?php if ( have_posts() ) : the_post(); ?>
  16  
  17              <header class="page-header">
  18                  <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentytwelve' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
  19              </header>
  20  
  21              <?php rewind_posts(); ?>
  22  
  23              <?php twentytwelve_content_nav( 'nav-above' ); ?>
  24  
  25              <?php
  26              // If a user has filled out their description, show a bio on their entries.
  27              if ( get_the_author_meta( 'description' ) ) : ?>
  28              <div id="author-info">
  29                  <div id="author-avatar">
  30                      <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 60 ) ); ?>
  31                  </div><!-- #author-avatar -->
  32                  <div id="author-description">
  33                      <h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
  34                      <?php the_author_meta( 'description' ); ?>
  35                  </div><!-- #author-description    -->
  36              </div><!-- #author-info -->
  37              <?php endif; ?>
  38  
  39              <?php /* Start the Loop */ ?>
  40              <?php while ( have_posts() ) : the_post(); ?>
  41                  <?php get_template_part( 'content', get_post_format() ); ?>
  42              <?php endwhile; ?>
  43  
  44              <?php twentytwelve_content_nav( 'nav-below' ); ?>
  45  
  46          <?php else : ?>
  47  
  48              <article id="post-0" class="post no-results not-found">
  49                  <header class="entry-header">
  50                      <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1>
  51                  </header><!-- .entry-header -->
  52  
  53                  <div class="entry-content">
  54                      <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p>
  55                      <?php get_search_form(); ?>
  56                  </div><!-- .entry-content -->
  57              </article><!-- #post-0 -->
  58  
  59          <?php endif; ?>
  60  
  61          </div><!-- #content -->
  62      </section><!-- #primary -->
  63  
  64  <?php get_sidebar(); ?>
  65  <?php get_footer(); ?>


Generated: Tue Mar 20 03:55:56 2012 Hosted by follow the white rabbit.