1. <?php
  2. /**
  3. * The template for displaying Author pages.
  4. *
  5. */
  6. ?>
  7. <?php get_header(); ?>
  8. <div class="page-heading">
  9. <?php if (have_posts()) : the_post(); ?>
  10. <h1 class="page-title"><a href="#"><?php printf(__('Author Archives: %s', 'black-bird'), "<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>"); ?></a></h1>
  11. </div>
  12. <div class="clear"></div>
  13. <!--Start Page Content -->
  14. <div class="page-content-container">
  15. <div class="page-content">
  16. <div class="grid_16 alpha">
  17. <div class="content-bar">
  18.  
  19. <?php
  20. /* Queue the first post, that way we know who
  21. * the author is when we try to get their name,
  22. * URL, description, avatar, etc.
  23. *
  24. * We reset this later so we can run the loop
  25. * properly with a call to rewind_posts().
  26. */
  27. if (have_posts())
  28. the_post();
  29. ?>
  30. <?php
  31. // If a user has filled out their description, show a bio on their entries.
  32. if (get_the_author_meta('description')) :
  33. ?>
  34. <div id="entry-author-info">
  35. <div id="author-avatar"> <?php echo get_avatar(get_the_author_meta('user_email'), apply_filters('blackbird_author_bio_avatar_size', 60)); ?> </div>
  36. <!-- #author-avatar -->
  37. <div id="author-description">
  38. <h2><?php printf(__('About %s', 'black-bird'), get_the_author()); ?></h2>
  39. <?php the_author_meta('description'); ?>
  40. </div>
  41. <!-- #author-description -->
  42. </div>
  43. <!-- #entry-author-info -->
  44. <?php endif; ?>
  45. <?php
  46. /* Since we called the_post() above, we need to
  47. * rewind the loop back to the beginning that way
  48. * we can run the loop properly, in full.
  49. */
  50. rewind_posts();
  51. /* Run the loop for the author archive page to output the authors posts
  52. * If you want to overload this in a child theme then include a file
  53. * called loop-author.php and that will be used instead.
  54. */
  55. get_template_part('loop', 'author');
  56. ?>
  57. <div class="clear"></div>
  58. <nav id="nav-single"> <span class="nav-previous">
  59. <?php next_posts_link(__('&larr; Older posts', 'black-bird')); ?>
  60. </span> <span class="nav-next">
  61. <?php previous_posts_link(__('Newer posts &rarr;', 'black-bird')); ?>
  62. </span> </nav>
  63. <?php endif; ?>
  64. </div>
  65. </div>
  66. <div class="grid_8 omega">
  67. <!--Start Sidebar-->
  68. <?php get_sidebar(); ?>
  69. <!--End Sidebar-->
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <?php get_footer(); ?>