archive.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * The template for displaying archive pages.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package TextBook
  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. the_archive_description( '<div class="taxonomy-description">', '</div>' );
  17. ?>
  18. </header>
  19. <?php // Start the Loop
  20. while ( have_posts() ) : the_post();
  21. /*
  22. * Include the Post-Format-specific template for the content.
  23. * If you want to override this in a child theme, then include a file
  24. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  25. */
  26. get_template_part( 'components/post/content', 'card' );
  27. endwhile; ?>
  28. <?php the_posts_navigation(); ?>
  29. <?php else :
  30. get_template_part( 'components/post/content', 'none' );
  31. endif; ?>
  32. </main>
  33. </div>
  34. <?php
  35. get_sidebar();
  36. get_footer();