archive.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php get_header(); ?>
  2. <div id="content">
  3. <div id="inner-content" class="wrap cf">
  4. <main id="main" class="m-all t-2of3 d-5of7 cf" role="main" itemscope itemprop="mainContentOfPage" itemtype="http://schema.org/Blog">
  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="entry-header 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 entry-meta vcard">
  38. <?php printf( __( 'Posted %1$s by %2$s', 'bonestheme' ),
  39. /* the time the post was published */
  40. '<time class="updated entry-time" datetime="' . get_the_time('Y-m-d') . '" itemprop="datePublished">' . get_the_time(get_option('date_format')) . '</time>',
  41. /* the author of the post */
  42. '<span class="by">by</span> <span class="entry-author author" itemprop="author" itemscope itemptype="http://schema.org/Person">' . get_the_author_link( get_the_author_meta( 'ID' ) ) . '</span>'
  43. ); ?>
  44. </p>
  45. </header>
  46. <section class="entry-content cf">
  47. <?php the_post_thumbnail( 'bones-thumb-300' ); ?>
  48. <?php the_excerpt(); ?>
  49. </section>
  50. <footer class="article-footer">
  51. </footer>
  52. </article>
  53. <?php endwhile; ?>
  54. <?php bones_page_navi(); ?>
  55. <?php else : ?>
  56. <article id="post-not-found" class="hentry cf">
  57. <header class="article-header">
  58. <h1><?php _e( 'Oops, Post Not Found!', 'bonestheme' ); ?></h1>
  59. </header>
  60. <section class="entry-content">
  61. <p><?php _e( 'Uh Oh. Something is missing. Try double checking things.', 'bonestheme' ); ?></p>
  62. </section>
  63. <footer class="article-footer">
  64. <p><?php _e( 'This is the error message in the archive.php template.', 'bonestheme' ); ?></p>
  65. </footer>
  66. </article>
  67. <?php endif; ?>
  68. </main>
  69. <?php get_sidebar(); ?>
  70. </div>
  71. </div>
  72. <?php get_footer(); ?>