PageRenderTime 48ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/the-go-green-theme/archive.php

https://bitbucket.org/aqge/deptandashboard
PHP | 65 lines | 42 code | 23 blank | 0 comment | 9 complexity | 31ae3879140f2cfc60df45b076131367 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1
  1. <?php get_header(); ?>
  2. <div id="content" class="narrowcolumn">
  3. <?php if (have_posts()) : ?>
  4. <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  5. <?php /* If this is a category archive */ if (is_category()) { ?>
  6. <h2 class="pagetitle">Archive for the &#8216;<?php single_cat_title(); ?>&#8217; Category</h2>
  7. <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  8. <h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
  9. <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  10. <h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
  11. <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  12. <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
  13. <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  14. <h2 class="pagetitle">Author Archive</h2>
  15. <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  16. <h2 class="pagetitle">Blog Archives</h2>
  17. <?php } ?>
  18. <div class="navigation">
  19. <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
  20. <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
  21. </div>
  22. <?php while (have_posts()) : the_post(); ?>
  23. <div class="post">
  24. <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
  25. <small><?php the_time('l, F jS, Y') ?></small>
  26. <div class="entry">
  27. <?php the_content() ?>
  28. </div>
  29. <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p>
  30. </div>
  31. <?php endwhile; ?>
  32. <div class="navigation">
  33. <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
  34. <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
  35. </div>
  36. <?php else : ?>
  37. <h2 class="center">Not Found</h2>
  38. <?php include (TEMPLATEPATH . '/searchform.php'); ?>
  39. <?php endif; ?>
  40. </div>
  41. <?php get_sidebar(); ?>
  42. <?php get_footer(); ?>