index.php 1.1 KB

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