archive.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * The template for displaying archive pages.
  4. *
  5. * Learn more: http://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Apostrophe 2
  8. */
  9. get_header(); ?>
  10. <section id="primary" class="content-area">
  11. <?php if ( have_posts() ) : ?>
  12. <header class="page-header">
  13. <?php
  14. the_archive_title( '<h1 class="page-title">', '</h1>' );
  15. if ( is_author() && '' !== get_the_author_meta( 'description' ) ) {
  16. echo '<div class="taxonomy-description">' . get_the_author_meta( 'description' ) . '</div><!-- .taxonomy-description -->';
  17. } else {
  18. the_archive_description( '<div class="taxonomy-description">', '</div><!-- .taxonomy-description -->' );
  19. }
  20. ?>
  21. </header><!-- .page-header -->
  22. <main id="main" class="site-main" role="main">
  23. <div id="posts-wrapper">
  24. <?php /* Start the Loop */ ?>
  25. <?php while ( have_posts() ) : the_post(); ?>
  26. <?php
  27. /* Include the Post-Format-specific template for the content.
  28. * If you want to override this in a child theme, then include a file
  29. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  30. */
  31. get_template_part( 'content', get_post_format() );
  32. ?>
  33. <?php endwhile; ?>
  34. <div><!-- #posts-wrapper -->
  35. <?php else : ?>
  36. <?php get_template_part( 'content', 'none' ); ?>
  37. <?php endif; ?>
  38. </main><!-- #main -->
  39. <?php the_posts_navigation(); ?>
  40. </section><!-- #primary -->
  41. <?php get_sidebar(); ?>
  42. <?php get_footer(); ?>