archive.php 1.2 KB

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