archive.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 WordPress
  9. * @subpackage Varia
  10. * @since 1.0.0
  11. */
  12. get_header();
  13. ?>
  14. <section id="primary" class="content-area">
  15. <main id="main" class="site-main">
  16. <?php if ( have_posts() ) : ?>
  17. <header class="page-header">
  18. <?php
  19. the_archive_title( '<h1 class="page-title">', '</h1>' );
  20. ?>
  21. </header><!-- .page-header -->
  22. <?php
  23. // Start the Loop.
  24. while ( have_posts() ) :
  25. the_post();
  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/content', 'excerpt' );
  32. // End the loop.
  33. endwhile;
  34. // Previous/next page navigation.
  35. varia_the_posts_navigation();
  36. // If no content, include the "No posts found" template.
  37. else :
  38. get_template_part( 'template-parts/content/content', 'none' );
  39. endif;
  40. ?>
  41. </main><!-- #main -->
  42. </section><!-- #primary -->
  43. <?php
  44. get_footer();