PageRenderTime 91ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/archive.php

https://github.com/lecar-red/3ring-wordpress
PHP | 48 lines | 34 code | 10 blank | 4 comment | 4 complexity | 149a1935421f9f86ccba27f46e776318 MD5 | raw file
Possible License(s): AGPL-1.0
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Yoko
  5. */
  6. get_header(); ?>
  7. <div id="wrap">
  8. <div id="main">
  9. <div id="content">
  10. <?php the_post(); ?>
  11. <header class="page-header">
  12. <h1 class="page-title">
  13. <?php if ( is_day() ) : ?>
  14. <?php printf( __( 'Daily Archives: <span>%s</span>', 'yoko' ), get_the_date() ); ?>
  15. <?php elseif ( is_month() ) : ?>
  16. <?php printf( __( 'Monthly Archives: <span>%s</span>', 'yoko' ), get_the_date( 'F Y' ) ); ?>
  17. <?php elseif ( is_year() ) : ?>
  18. <?php printf( __( 'Yearly Archives: <span>%s</span>', 'yoko' ), get_the_date( 'Y' ) ); ?>
  19. <?php else : ?>
  20. <?php _e( 'Blog Archives', 'yoko' ); ?>
  21. <?php endif; ?>
  22. </h1>
  23. </header><!-- end page header -->
  24. <?php rewind_posts(); ?>
  25. <?php /* Start the Loop */ ?>
  26. <?php while ( have_posts() ) : the_post(); ?>
  27. <?php get_template_part( 'content', get_post_format() ); ?>
  28. <?php endwhile; ?>
  29. <?php /* Display navigation to next/previous pages when applicable */ ?>
  30. <?php if ( $wp_query->max_num_pages > 1 ) : ?>
  31. <nav id="nav-below">
  32. <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'yoko' ) ); ?></div>
  33. <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'yoko' ) ); ?></div>
  34. </nav><!-- end nav-below -->
  35. <?php endif; ?>
  36. </div><!-- end content -->
  37. <?php get_sidebar(); ?>
  38. <?php get_footer(); ?>