archive.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * The template for displaying archive pages
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package Seedlet
  8. * @since 1.0.0
  9. */
  10. get_header();
  11. ?>
  12. <section id="primary" class="content-area">
  13. <main id="main" class="site-main" role="main">
  14. <?php if ( have_posts() ) : ?>
  15. <header class="page-header default-max-width">
  16. <?php the_archive_title(); ?>
  17. <?php the_archive_description('<div class="archive-description">', '</div>'); ?>
  18. </header><!-- .page-header -->
  19. <?php
  20. // Start the Loop.
  21. while ( have_posts() ) :
  22. 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/content', get_theme_mod( 'archive_display_excerpt_or_full_post', 'full' ) );
  29. // End the loop.
  30. endwhile;
  31. // Numbered pagination.
  32. seedlet_the_posts_pagination();
  33. // If no content, include the "No posts found" template.
  34. else :
  35. get_template_part( 'template-parts/content/content-none' );
  36. endif;
  37. ?>
  38. </main><!-- #main -->
  39. </section><!-- #primary -->
  40. <?php
  41. get_footer();