archive.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 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
  38. printf(__( 'Posted <time class="updated" datetime="%1$s" pubdate>%2$s</time> by <span class="author">%3$s</span> <span class="amp">&</span> filed under %4$s.', 'bonestheme' ), get_the_time('Y-m-j'), get_the_time(__( 'F jS, Y', 'bonestheme' )), bones_get_the_author_posts_link(), get_the_category_list(', '));
  39. ?></p>
  40. </header> <?php // end article header ?>
  41. <section class="entry-content clearfix">
  42. <?php the_post_thumbnail( 'bones-thumb-300' ); ?>
  43. <?php the_excerpt(); ?>
  44. </section> <?php // end article section ?>
  45. <footer class="article-footer">
  46. </footer> <?php // end article footer ?>
  47. </article> <?php // end article ?>
  48. <?php endwhile; ?>
  49. <?php if ( function_exists( 'bones_page_navi' ) ) { ?>
  50. <?php bones_page_navi(); ?>
  51. <?php } else { ?>
  52. <nav class="wp-prev-next">
  53. <ul class="clearfix">
  54. <li class="prev-link"><?php next_posts_link( __( '&laquo; Older Entries', 'bonestheme' )) ?></li>
  55. <li class="next-link"><?php previous_posts_link( __( 'Newer Entries &raquo;', 'bonestheme' )) ?></li>
  56. </ul>
  57. </nav>
  58. <?php } ?>
  59. <?php else : ?>
  60. <article id="post-not-found" class="hentry clearfix">
  61. <header class="article-header">
  62. <h1><?php _e( 'Oops, Post Not Found!', 'bonestheme' ); ?></h1>
  63. </header>
  64. <section class="entry-content">
  65. <p><?php _e( 'Uh Oh. Something is missing. Try double checking things.', 'bonestheme' ); ?></p>
  66. </section>
  67. <footer class="article-footer">
  68. <p><?php _e( 'This is the error message in the archive.php template.', 'bonestheme' ); ?></p>
  69. </footer>
  70. </article>
  71. <?php endif; ?>
  72. </div> <?php // end #main ?>
  73. <?php get_sidebar(); ?>
  74. </div> <?php // end #inner-content ?>
  75. </div> <?php // end #content ?>
  76. <?php get_footer(); ?>