archive.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. <?php if (is_category()) { ?>
  6. <h1 class="archive-title h2">
  7. <span><?php _e("Posts Categorized:", "bonestheme"); ?></span> <?php single_cat_title(); ?>
  8. </h1>
  9. <?php } elseif (is_tag()) { ?>
  10. <h1 class="archive-title h2">
  11. <span><?php _e("Posts Tagged:", "bonestheme"); ?></span> <?php single_tag_title(); ?>
  12. </h1>
  13. <?php } elseif (is_author()) {
  14. global $post;
  15. $author_id = $post->post_author;
  16. ?>
  17. <h1 class="archive-title h2">
  18. <span><?php _e("Posts By:", "bonestheme"); ?></span> <?php echo get_the_author_meta('display_name', $author_id); ?>
  19. </h1>
  20. <?php } elseif (is_day()) { ?>
  21. <h1 class="archive-title h2">
  22. <span><?php _e("Daily Archives:", "bonestheme"); ?></span> <?php the_time('l, F j, Y'); ?>
  23. </h1>
  24. <?php } elseif (is_month()) { ?>
  25. <h1 class="archive-title h2">
  26. <span><?php _e("Monthly Archives:", "bonestheme"); ?></span> <?php the_time('F Y'); ?>
  27. </h1>
  28. <?php } elseif (is_year()) { ?>
  29. <h1 class="archive-title h2">
  30. <span><?php _e("Yearly Archives:", "bonestheme"); ?></span> <?php the_time('Y'); ?>
  31. </h1>
  32. <?php } ?>
  33. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  34. <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article">
  35. <header class="article-header">
  36. <h3 class="h2"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
  37. <p class="byline vcard"><?php _e("Posted", "bonestheme"); ?> <time class="updated" datetime="<?php echo the_time('Y-m-j'); ?>" pubdate><?php the_time('F jS, Y'); ?></time> <?php _e("by", "bonestheme"); ?> <span class="author"><?php the_author_posts_link(); ?></span> <span class="amp">&</span> <?php _e("filed under", "bonestheme"); ?> <?php the_category(', '); ?>.</p>
  38. </header> <!-- end article header -->
  39. <section class="entry-content clearfix">
  40. <?php the_post_thumbnail( 'bones-thumb-300' ); ?>
  41. <?php the_excerpt(); ?>
  42. </section> <!-- end article section -->
  43. <footer class="article-footer">
  44. </footer> <!-- end article footer -->
  45. </article> <!-- end article -->
  46. <?php endwhile; ?>
  47. <?php if (function_exists('bones_page_navi')) { // if experimental feature is active ?>
  48. <?php bones_page_navi(); // use the page navi function ?>
  49. <?php } else { // if it is disabled, display regular wp prev & next links ?>
  50. <nav class="wp-prev-next">
  51. <ul class="clearfix">
  52. <li class="prev-link"><?php next_posts_link(_e('&laquo; Older Entries', "bonestheme")) ?></li>
  53. <li class="next-link"><?php previous_posts_link(_e('Newer Entries &raquo;', "bonestheme")) ?></li>
  54. </ul>
  55. </nav>
  56. <?php } ?>
  57. <?php else : ?>
  58. <article id="post-not-found" class="hentry clearfix">
  59. <header class="article-header">
  60. <h1><?php _e("Oops, Post Not Found!", "bonestheme"); ?></h1>
  61. </header>
  62. <section class="entry-content">
  63. <p><?php _e("Uh Oh. Something is missing. Try double checking things.", "bonestheme"); ?></p>
  64. </section>
  65. <footer class="article-footer">
  66. <p><?php _e("This is the error message in the archive.php template.", "bonestheme"); ?></p>
  67. </footer>
  68. </article>
  69. <?php endif; ?>
  70. </div> <!-- end #main -->
  71. <?php get_sidebar(); // sidebar 1 ?>
  72. </div> <!-- end #inner-content -->
  73. </div> <!-- end #content -->
  74. <?php get_footer(); ?>