archive.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * The template for displaying archive pages
  4. *
  5. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  6. *
  7. * @package UIU_CSE
  8. */
  9. get_header();
  10. ?>
  11. <main id="primary" class="site-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="archive-description">', '</div>' );
  17. ?>
  18. </header><!-- .page-header -->
  19. <?php
  20. /* Start the Loop */
  21. while ( have_posts() ) :
  22. the_post();
  23. /*
  24. * Include the Post-Type-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 Type name) and that will be used instead.
  27. */
  28. get_template_part( 'template-parts/content', get_post_type() );
  29. endwhile;
  30. the_posts_navigation();
  31. else :
  32. get_template_part( 'template-parts/content', 'none' );
  33. endif;
  34. ?>
  35. </main><!-- #main -->
  36. <?php
  37. get_sidebar();
  38. get_footer();