index.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * The main template file
  4. *
  5. * This is the most generic template file in a WordPress theme
  6. * and one of the two required files for a theme (the other being style.css).
  7. * It is used to display a page when nothing more specific matches a query.
  8. * E.g., it puts together the home page when no home.php file exists.
  9. *
  10. * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
  11. *
  12. * @package Seedlet
  13. * @since 1.0.0
  14. */
  15. get_header();
  16. ?>
  17. <section id="primary" class="content-area">
  18. <main id="main" class="site-main" role="main">
  19. <?php
  20. if ( have_posts() ) {
  21. // Load posts loop.
  22. while ( have_posts() ) {
  23. the_post();
  24. get_template_part( 'template-parts/content/content', get_theme_mod( 'index_display_excerpt_or_full_post', 'full' ) );
  25. }
  26. // Numbered pagination.
  27. seedlet_the_posts_pagination();
  28. } else {
  29. // If no content, include the "No posts found" template.
  30. get_template_part( 'template-parts/content/content-none' );
  31. }
  32. ?>
  33. </main><!-- .site-main -->
  34. </section><!-- .content-area -->
  35. <?php
  36. get_footer();