archive.php 1.1 KB

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