archive.php 863 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * The template for displaying archive pages
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package photos
  8. */
  9. get_header();
  10. ?>
  11. <div id="primary" class="content-area">
  12. <main id="main" class="site-main">
  13. <?php 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="archive-description">', '</div>' );
  18. ?>
  19. </header><!-- .page-header -->
  20. <?php
  21. /* Start the Loop */
  22. while ( have_posts() ) :
  23. the_post();
  24. get_template_part( 'template-parts/content', 'grid' );
  25. endwhile;
  26. the_posts_navigation();
  27. else :
  28. get_template_part( 'template-parts/content', 'none' );
  29. endif;
  30. ?>
  31. </main><!-- #main -->
  32. </div><!-- #primary -->
  33. <?php
  34. get_sidebar();
  35. get_footer();