archive.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php get_header(); ?>
  2. <div class="wrapper section-inner">
  3. <div class="content left">
  4. <div class="posts">
  5. <div class="page-title">
  6. <h4><?php if ( is_day() ) : ?>
  7. <?php printf( __( 'Date: %s', 'hemingway' ), '' . get_the_date() . '' ); ?>
  8. <?php elseif ( is_month() ) : ?>
  9. <?php printf( __( 'Month: %s', 'hemingway' ), '' . get_the_date( _x( 'F Y', 'F = Month, Y = Year', 'hemingway' ) ) ); ?>
  10. <?php elseif ( is_year() ) : ?>
  11. <?php printf( __( 'Year: %s', 'hemingway' ), '' . get_the_date( _x( 'Y', 'Y = Year', 'hemingway' ) ) ); ?>
  12. <?php elseif ( is_category() ) : ?>
  13. <?php printf( __( 'Category: %s', 'hemingway' ), '' . single_cat_title( '', false ) . '' ); ?>
  14. <?php elseif ( is_tag() ) : ?>
  15. <?php printf( __( 'Tag: %s', 'hemingway' ), '' . single_tag_title( '', false ) . '' ); ?>
  16. <?php elseif ( is_author() ) : ?>
  17. <?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?>
  18. <?php printf( __( 'Author: %s', 'hemingway' ), $curauth->display_name ); ?>
  19. <?php else : ?>
  20. <?php _e( 'Archive', 'hemingway' ); ?>
  21. <?php endif; ?>
  22. <?php
  23. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  24. if ( "1" < $wp_query->max_num_pages ) : ?>
  25. <span><?php printf( __('(page %s of %s)', 'hemingway'), $paged, $wp_query->max_num_pages ); ?></span>
  26. <?php endif; ?></h4>
  27. <?php
  28. $tag_description = tag_description();
  29. if ( ! empty( $tag_description ) )
  30. echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' );
  31. ?>
  32. </div> <!-- /page-title -->
  33. <div class="clear"></div>
  34. <?php if ( have_posts() ) : ?>
  35. <?php rewind_posts(); ?>
  36. <?php while ( have_posts() ) : the_post(); ?>
  37. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  38. <?php get_template_part( 'content', get_post_format() ); ?>
  39. <div class="clear"></div>
  40. </div> <!-- /post -->
  41. <?php endwhile; ?>
  42. </div> <!-- /posts -->
  43. <?php if ( $wp_query->max_num_pages > 1 ) : ?>
  44. <div class="post-nav archive-nav">
  45. <?php echo get_next_posts_link( __('Older<span> posts</span>', 'hemingway')); ?>
  46. <?php echo get_previous_posts_link( __('Newer<span> posts</span>', 'hemingway')); ?>
  47. <div class="clear"></div>
  48. </div> <!-- /post-nav archive-nav -->
  49. <div class="clear"></div>
  50. <?php endif; ?>
  51. <?php endif; ?>
  52. </div> <!-- /content -->
  53. <?php get_sidebar(); ?>
  54. <div class="clear"></div>
  55. </div> <!-- /wrapper -->
  56. <?php get_footer(); ?>