/author.php

  1. <?php 
  2. /** 
  3. * The template for displaying Author Archive pages. 
  4. * 
  5. * @package WordPress 
  6. * @subpackage 1st-tec Twenty Ten 
  7. * @since 1st-tec Twenty Ten 1.2 
  8. */ 
  9.  
  10. get_header(); 
  11. get_sidebar( 'left' ); 
  12. if ( is_active_sidebar( 'secondary-widget-area' ) && is_active_sidebar( 'primary-widget-area' ) && is_active_sidebar( 'left-widget-area' )) {?> 
  13. <div id="container" class="three-sidebar"> 
  14. <?php } elseif ( is_active_sidebar( 'primary-widget-area' ) && is_active_sidebar( 'left-widget-area' )) {?> 
  15. <div id="container" class="two-sidebar"> 
  16. <?php } elseif ( is_active_sidebar( 'secondary-widget-area' ) && is_active_sidebar( 'primary-widget-area' )) {?> 
  17. <div id="container" class="two-sidebar"> 
  18. <?php } else { ?> 
  19. <div id="container"> 
  20. <?php } ?> 
  21. <div id="content" role="main"> 
  22.  
  23. <?php 
  24. /** Queue the first post, that way we know who 
  25. * the author is when we try to get their name,  
  26. * URL, description, avatar, etc. 
  27. * 
  28. * We reset this later so we can run the loop 
  29. * properly with a call to rewind_posts(). 
  30. */ 
  31. if ( have_posts() ) 
  32. the_post(); 
  33. ?> 
  34.  
  35. <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'firsttec' ), "<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> 
  36.  
  37. <?php 
  38. // If a user has filled out their description, show a bio on their entries. 
  39. if ( get_the_author_meta( 'description' ) ) : ?> 
  40. <div id="entry-author-info"> 
  41. <div id="author-avatar"> 
  42. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'firsttec_author_bio_avatar_size', 60 ) ); ?> 
  43. </div><!-- #author-avatar --> 
  44. <div id="author-description"> 
  45. <h2><?php printf( __( 'About %s', 'firsttec' ), get_the_author() ); ?></h2> 
  46. <?php the_author_meta( 'description' ); ?> 
  47. </div><!-- #author-description --> 
  48. </div><!-- #entry-author-info --> 
  49. <?php endif; ?> 
  50.  
  51. <?php 
  52. /** Since we called the_post() above, we need to 
  53. * rewind the loop back to the beginning that way 
  54. * we can run the loop properly, in full. 
  55. */ 
  56. rewind_posts(); 
  57.  
  58. /** Run the loop for the author archive page to output the authors posts 
  59. * If you want to overload this in a child theme then include a file 
  60. * called loop-author.php and that will be used instead. 
  61. */ 
  62. get_template_part( 'loop', 'author' ); 
  63. ?> 
  64. </div><!-- #content --> 
  65. </div><!-- #container --> 
  66.  
  67. <?php get_sidebar(); ?> 
  68. <?php get_footer(); ?> 
.