PageRenderTime 46ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/archive.php

https://github.com/chrisblackwell/LifeLine
PHP | 41 lines | 28 code | 13 blank | 0 comment | 5 complexity | 08d27e07f305198a0232c4bd8975f97a MD5 | raw file
  1. <?php get_header(); ?>
  2. <section class="content" role="main">
  3. <?php if ( have_posts() ) : ?>
  4. <h1 class="archive-title"><?php
  5. if ( is_day() ) :
  6. printf( __( 'Daily Archives: %s' ), '<span>' . get_the_date() . '</span>' );
  7. elseif ( is_month() ) :
  8. printf( __( 'Monthly Archives: %s' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentytwelve' ) ) . '</span>' );
  9. elseif ( is_year() ) :
  10. printf( __( 'Yearly Archives: %s' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentytwelve' ) ) . '</span>' );
  11. elseif ( is_category() ) :
  12. printf( __( 'Category Archives: %s' ), '<span>' . single_cat_title( '', false ) . '</span>' );
  13. elseif ( is_tag() ) :
  14. printf( __( 'Tag Archives: %s' ), '<span>' . single_tag_title( '', false ) . '</span>' );
  15. else :
  16. _e( 'Archives' );
  17. endif;
  18. ?></h1>
  19. <?php while ( have_posts() ) : the_post(); ?>
  20. <?php get_template_part( 'content', get_post_format() ); ?>
  21. <?php endwhile; else : ?>
  22. <h2>There are no posts available</h2>
  23. <?php get_search_form(); ?>
  24. <?php endif; ?>
  25. <?php yab_pagination(); ?>
  26. </section>
  27. <?php get_sidebar(); ?>
  28. <?php get_footer(); ?>