index.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 WordPress
  14. * @subpackage Varia
  15. * @since 1.0.0
  16. */
  17. get_header();
  18. ?>
  19. <section id="primary" class="content-area">
  20. <main id="main" class="site-main">
  21. <?php
  22. if ( have_posts() ) {
  23. // Load posts loop.
  24. while ( have_posts() ) {
  25. the_post();
  26. get_template_part( 'template-parts/content/content' );
  27. }
  28. // Previous/next page navigation.
  29. varia_the_posts_navigation();
  30. } else {
  31. // If no content, include the "No posts found" template.
  32. get_template_part( 'template-parts/content/content', 'none' );
  33. }
  34. ?>
  35. </main><!-- .site-main -->
  36. </section><!-- .content-area -->
  37. <?php
  38. get_footer();