PageRenderTime 49ms CodeModel.GetById 9ms RepoModel.GetById 0ms app.codeStats 0ms

/blog/wp-content/themes/springloaded/archive.php

https://bitbucket.org/sergiohzlz/reportaprod
PHP | 63 lines | 51 code | 12 blank | 0 comment | 5 complexity | de26208a8e833bb740c609721bd2b43a MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
  1. <?php get_header() ?>
  2. <div id="content">
  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"><?php printf(__('Archive for the &#8216;%s&#8217; Category', 'springloaded'), single_cat_title('', false)); ?></h2>
  7. <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  8. <h2 class="pagetitle"><?php printf(__('Posts Tagged &#8216;%s&#8217;', 'springloaded'), single_tag_title('', false) ); ?></h2>
  9. <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  10. <h2 class="pagetitle"><?php printf(_c('Archive for %s|Daily archive page', 'springloaded'), get_the_time(__('F jS, Y', 'springloaded'))); ?></h2>
  11. <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  12. <h2 class="pagetitle"><?php printf(_c('Archive for %s|Monthly archive page', 'springloaded'), get_the_time(__('F, Y', 'springloaded'))); ?></h2>
  13. <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  14. <h2 class="pagetitle"><?php printf(_c('Archive for %s|Yearly archive page', 'springloaded'), get_the_time(__('Y', 'springloaded'))); ?></h2>
  15. <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  16. <h2 class="pagetitle"><?php _e('Author Archive', 'springloaded'); ?></h2>
  17. <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  18. <h2 class="pagetitle"><?php _e('Blog Archives', 'springloaded'); ?></h2>
  19. <?php } ?>
  20. <?php while (have_posts()) : the_post(); ?>
  21. <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
  22. <p class="post-date" title="<?php printf(__('%1$s at %2$s'), get_the_time(get_option('date_format')), get_the_time(get_option('time_format'))); ?>">
  23. <span class="date-day"><?php the_time('j') ?></span>
  24. <span class="date-month"><?php the_time('M') ?></span>
  25. </p>
  26. <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php echo esc_attr( sprintf( __( 'Permanent link to %s' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php the_title(); ?></a></h3>
  27. <p class="metadata">
  28. <?php printf(__('Posted by %1$s in %2$s.'), get_the_author(), get_the_category_list(', ')); ?>
  29. <?php the_tags(__('Tagged: ', 'sandbox'), ", ", "."); ?>
  30. <span class="feedback"><?php comments_popup_link(__('Leave a Comment'), __('1 Comment'), __('% Comments')); ?></span><?php edit_post_link('Edit', ' | ', ''); ?></p>
  31. <div class="entry">
  32. <?php the_excerpt(); ?>
  33. <p><a href="<?php the_permalink(); ?>"><span class="more-link"><?php _e('Continue reading &raquo;', 'springloaded') ?></span></a></p>
  34. </div>
  35. </div>
  36. <?php endwhile; ?>
  37. <div class="prev-next">
  38. <div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries')); ?></div>
  39. <div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;')); ?></div>
  40. </div>
  41. <?php else : ?>
  42. <div <?php post_class(); ?>>
  43. <h2 class="center"><?php _e('Not Found'); ?></h2>
  44. <p class="center"><?php _e('Sorry, but you are looking for something that isn\'t here.'); ?></p>
  45. <?php include (TEMPLATEPATH . "/searchform.php"); ?>
  46. </div>
  47. <?php endif; ?>
  48. </div><!-- /content -->
  49. </div><!-- /main -->
  50. <?php get_sidebar() ?>
  51. <?php get_footer() ?>