archive.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php declare( strict_types = 1 ); ?>
  2. <?php
  3. /**
  4. * The template for displaying archive pages
  5. *
  6. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  7. *
  8. * @package Seedlet
  9. * @since 1.0.0
  10. */
  11. get_header();
  12. ?>
  13. <section id="primary" class="content-area">
  14. <main id="main" class="site-main" role="main">
  15. <?php if ( have_posts() ) : ?>
  16. <header class="page-header default-max-width">
  17. <?php the_archive_title(); ?>
  18. <?php the_archive_description('<div class="archive-description">', '</div>'); ?>
  19. </header><!-- .page-header -->
  20. <?php
  21. // Start the Loop.
  22. while ( have_posts() ) :
  23. the_post();
  24. /*
  25. * Include the Post-Format-specific template for the content.
  26. * If you want to override this in a child theme, then include a file
  27. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  28. */
  29. get_template_part( 'template-parts/content/content', get_theme_mod( 'archive_display_excerpt_or_full_post', 'full' ) );
  30. // End the loop.
  31. endwhile;
  32. // Numbered pagination.
  33. seedlet_the_posts_pagination();
  34. // If no content, include the "No posts found" template.
  35. else :
  36. get_template_part( 'template-parts/content/content-none' );
  37. endif;
  38. ?>
  39. </main><!-- #main -->
  40. </section><!-- #primary -->
  41. <?php
  42. get_footer();