archive.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php get_header(); ?>
  2. <div id="content">
  3. <div id="inner-content" class="wrap cf">
  4. <div id="main" class="m-all t-2of3 d-5of7 cf" 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( 'cf' ); ?> role="article">
  35. <header class="article-header">
  36. <h3 class="h2 entry-title"><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', 'bonestheme' ) . ' <time class="updated" datetime="%1$s" itemprop="datePublished">%2$s</time> ' . __('by', 'bonestheme' ) . ' <span class="author">%3$s</span> <span class="amp">&</span> ' . __('filed under', 'bonestheme') . ' %4$s.', get_the_time('Y-m-j'), get_the_time(__( 'F jS, Y', 'bonestheme' )), get_the_author_link( get_the_author_meta( 'ID' ) ), get_the_category_list(', '));
  39. ?></p>
  40. </header>
  41. <section class="entry-content cf">
  42. <?php the_post_thumbnail( 'bones-thumb-300' ); ?>
  43. <?php the_excerpt(); ?>
  44. </section>
  45. <footer class="article-footer">
  46. </footer>
  47. </article>
  48. <?php endwhile; ?>
  49. <?php bones_page_navi(); ?>
  50. <?php else : ?>
  51. <article id="post-not-found" class="hentry cf">
  52. <header class="article-header">
  53. <h1><?php _e( 'Oops, Post Not Found!', 'bonestheme' ); ?></h1>
  54. </header>
  55. <section class="entry-content">
  56. <p><?php _e( 'Uh Oh. Something is missing. Try double checking things.', 'bonestheme' ); ?></p>
  57. </section>
  58. <footer class="article-footer">
  59. <p><?php _e( 'This is the error message in the archive.php template.', 'bonestheme' ); ?></p>
  60. </footer>
  61. </article>
  62. <?php endif; ?>
  63. </div>
  64. <?php get_sidebar(); ?>
  65. </div>
  66. </div>
  67. <?php get_footer(); ?>