archive.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php get_header(); ?>
  2. <div class="container">
  3. <div class="store-page">
  4. <div class="row">
  5. <div class="tencol">
  6. <?php if ( have_posts() ) : ?>
  7. <header class="page-header">
  8. <h1 class="page-title">
  9. <?php
  10. if ( is_category() ) {
  11. printf( __( 'Category Archives: %s', '_s' ), '<span>' . single_cat_title( '', false ) . '</span>' );
  12. } elseif ( is_tag() ) {
  13. printf( __( 'Tag Archives: %s', '_s' ), '<span>' . single_tag_title( '', false ) . '</span>' );
  14. } elseif ( is_author() ) {
  15. /* Queue the first post, that way we know
  16. * what author we're dealing with (if that is the case).
  17. */
  18. the_post();
  19. printf( __( 'Author Archives: %s', '_s' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( "ID" ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
  20. /* Since we called the_post() above, we need to
  21. * rewind the loop back to the beginning that way
  22. * we can run the loop properly, in full.
  23. */
  24. rewind_posts();
  25. } elseif ( is_day() ) {
  26. printf( __( 'Daily Archives: %s', '_s' ), '<span>' . get_the_date() . '</span>' );
  27. } elseif ( is_month() ) {
  28. printf( __( 'Monthly Archives: %s', '_s' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
  29. } elseif ( is_year() ) {
  30. printf( __( 'Yearly Archives: %s', '_s' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
  31. } else {
  32. _e( 'Archives', '_s' );
  33. }
  34. ?>
  35. </h1>
  36. </header>
  37. <?php rewind_posts(); ?>
  38. <?php /* Start the Loop */ ?>
  39. <?php while ( have_posts() ) : the_post(); ?>
  40. <?php get_template_part( 'content', get_post_format() );?>
  41. <?php endwhile; ?>
  42. <?php else : ?>
  43. <article id="post-0" class="post no-results not-found">
  44. <header class="entry-header">
  45. <h1 class="entry-title"><?php _e( 'Nothing Found', '_s' ); ?></h1>
  46. </header><!-- .entry-header -->
  47. <div class="entry-content">
  48. <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', '_s' ); ?></p>
  49. <?php get_search_form(); ?>
  50. </div><!-- .entry-content -->
  51. </article><!-- #post-0 -->
  52. <?php endif; ?>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <?php get_footer(); ?>