archive.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * The template for displaying archive pages.
  4. *
  5. * Learn more: http://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Libre 2
  8. */
  9. get_header(); ?>
  10. <div id="primary" class="content-area">
  11. <main id="main" class="site-main" role="main">
  12. <?php if ( have_posts() ) : ?>
  13. <header class="page-header">
  14. <?php
  15. the_archive_title( '<h1 class="page-title">', '</h1>' );
  16. if ( is_author() && '' !== get_the_author_meta( 'description' ) ) {
  17. echo '<div class="taxonomy-description">' . get_the_author_meta( 'description' ) . '</div><!-- .taxonomy-description -->';
  18. } else {
  19. the_archive_description( '<div class="taxonomy-description">', '</div><!-- .taxonomy-description -->' );
  20. }
  21. ?>
  22. </header><!-- .page-header -->
  23. <?php /* Start the Loop */ ?>
  24. <?php while ( have_posts() ) : the_post(); ?>
  25. <?php
  26. /*
  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( 'template-parts/content', get_post_format() );
  32. ?>
  33. <?php endwhile; ?>
  34. <?php the_posts_navigation(); ?>
  35. <?php else : ?>
  36. <?php get_template_part( 'template-parts/content', 'none' ); ?>
  37. <?php endif; ?>
  38. </main><!-- #main -->
  39. </div><!-- #primary -->
  40. <?php get_footer(); ?>