author.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php get_header(); ?>
  2. <div id="content">
  3. <div id="inner-content" class="wrap clearfix">
  4. <div id="main" class="eightcol first clearfix" role="main">
  5. <h1 class="archive-title h2">
  6. <span><?php __("Posts By:", "bonestheme"); ?></span>
  7. <!-- google+ rel=me function -->
  8. <?php $curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
  9. $google_profile = get_the_author_meta( 'google_profile', $curauth->ID );
  10. if ( $google_profile ) {
  11. echo '<a href="' . esc_url( $google_profile ) . '" rel="me">' . $curauth->display_name . '</a>'; ?></a>
  12. <?php } else { ?>
  13. <!-- if no result, then just display the name -->
  14. <?php echo get_the_author_meta('display_name'); ?>
  15. <?php } ?>
  16. </h1>
  17. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  18. <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article">
  19. <header class="article-header">
  20. <h3 class="h2"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
  21. <p class="meta"><?php __("Posted", "bonestheme"); ?> <time datetime="<?php echo the_time('Y-m-j'); ?>" pubdate><?php the_time('F jS, Y'); ?></time> <?php __("by", "bonestheme"); ?> <?php the_author_posts_link(); ?> <span class="amp">&</span> <?php __("filed under", "bonestheme"); ?> <?php the_category(', '); ?>.</p>
  22. </header> <!-- end article header -->
  23. <section class="post-content">
  24. <?php the_post_thumbnail( 'bones-thumb-300' ); ?>
  25. <?php the_excerpt(); ?>
  26. </section> <!-- end article section -->
  27. <footer class="article-footer">
  28. </footer> <!-- end article footer -->
  29. </article> <!-- end article -->
  30. <?php endwhile; ?>
  31. <?php if (function_exists('bones_page_navi')) { // if experimental feature is active ?>
  32. <?php bones_page_navi(); // use the page navi function ?>
  33. <?php } else { // if it is disabled, display regular wp prev & next links ?>
  34. <nav class="wp-prev-next">
  35. <ul class="clearfix">
  36. <li class="prev-link"><?php next_posts_link(__('&laquo; Older Entries', "bonestheme")) ?></li>
  37. <li class="next-link"><?php previous_posts_link(__('Newer Entries &raquo;', "bonestheme")) ?></li>
  38. </ul>
  39. </nav>
  40. <?php } ?>
  41. <?php else : ?>
  42. <article id="post-not-found" class="hentry clearfix">
  43. <header class="article-header">
  44. <h1><?php __("Oops, Post Not Found!", "bonestheme"); ?></h1>
  45. </header>
  46. <section class="post-content">
  47. <p><?php __("Uh Oh. Something is missing. Try double checking things.", "bonestheme"); ?></p>
  48. </section>
  49. <footer class="article-footer">
  50. <p><?php __("This is the error message in the author.php template.", "bonestheme"); ?></p>
  51. </footer>
  52. </article>
  53. <?php endif; ?>
  54. </div> <!-- end #main -->
  55. <?php get_sidebar(); // sidebar 1 ?>
  56. </div> <!-- end #inner-content -->
  57. </div> <!-- end #content -->
  58. <?php get_footer(); ?>