archive.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php get_header(); ?>
  2. <?php $options = get_option('philna_options'); ?>
  3. <div class="position"><?php _e('Archive:', 'philna'); ?>
  4. <strong>
  5. <?php
  6. // If this is a category archive
  7. if (is_category()) {
  8. printf( __('&#8216;%1$s&#8217; Category', 'philna'), single_cat_title('', false) );
  9. // If this is a tag archive
  10. } elseif(is_tag()) {
  11. printf( __('Posts Tagged &#8216;%1$s&#8217;', 'philna'), single_tag_title('', false) );
  12. // If this is a daily archive
  13. } elseif (is_day()) {
  14. printf( __('%1$s', 'philna'), get_the_time(__('F jS, Y', 'philna')) );
  15. // If this is a monthly archive
  16. } elseif (is_month()) {
  17. printf( __('%1$s', 'philna'), get_the_time(__('F, Y', 'philna')) );
  18. // If this is a yearly archive
  19. } elseif (is_year()) {
  20. printf( __('%1$s', 'philna'), get_the_time(__('Y', 'philna')) );
  21. // If this is an author archive
  22. } elseif (is_author()) {
  23. _e('Author Archive', 'philna');
  24. // If this is a paged archive
  25. } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
  26. _e('Blog Archives', 'philna');
  27. }
  28. ?>
  29. </strong>
  30. </div>
  31. <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
  32. <div class="post">
  33. <?php the_title('<h2 class="post-title entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark">', '</a></h2>'); ?>
  34. <div class="info">
  35. <?php edit_post_link(__('Edit', 'philna'), '<span class="editpost">', '</span>'); ?>
  36. <span class="comments-link"><?php comments_popup_link(__('No comments', 'philna'), __('1 comment', 'philna'), __('% comments', 'philna')); ?></span>
  37. <span class="published"><?php the_time(__('F jS, Y', 'philna')) ?></span>
  38. <span class="post-author"><a href="<?php echo get_author_posts_url(get_the_author_meta('ID'));?>"><?php the_author();?></a> </span>
  39. </div>
  40. <div class="entry-content">
  41. <?php the_content(__('Continue reading...','philna')); ?>
  42. </div>
  43. <div class="entry-meta">
  44. <span class="cat-links"><?php the_category(', '); ?></span>
  45. <?php the_tags('<span class="tag-links">', ', ', '</span>');?>
  46. </div>
  47. </div>
  48. <?php endwhile; ?>
  49. <?php else: ?>
  50. <p class="no-data"><?php _e('Sorry, no posts matched your criteria.','philna'); ?></p>
  51. <?php endif;if(has_next_page()):?>
  52. <div id="pagenavi">
  53. <?php if(function_exists('wp_pagenavi')) : ?>
  54. <?php wp_pagenavi() ?>
  55. <?php else : ?>
  56. <span class="newer"><?php previous_posts_link(__('Newer Entries', 'philna')); ?></span>
  57. <span class="older"><?php next_posts_link(__('Older Entries', 'philna')); ?></span>
  58. <?php endif; ?>
  59. <div class="fixed"></div>
  60. </div>
  61. <?php endif; ?>
  62. <?php get_footer(); ?>