index.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 WordPress
  13. * @subpackage 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">
  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' );
  26. }
  27. // Previous/next page navigation.
  28. seedlet_the_posts_navigation();
  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();