index.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. * Learn more: http://codex.wordpress.org/Template_Hierarchy
  10. *
  11. * @link http://codex.wordpress.org/Template_Hierarchy
  12. *
  13. * @package WordPress
  14. * @subpackage Twenty_Fifteen
  15. * @since Twenty Fifteen 1.0
  16. */
  17. get_header(); ?>
  18. <div id="primary" class="content-area">
  19. <main id="main" class="site-main" role="main">
  20. <?php if ( have_posts() ) : ?>
  21. <?php while ( have_posts() ) : the_post(); ?>
  22. <?php
  23. /* Include the Post-Format-specific template for the content.
  24. * If you want to override this in a child theme, then include a file
  25. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  26. */
  27. get_template_part( 'content', get_post_format() );
  28. ?>
  29. <?php endwhile; ?>
  30. <?php twentyfifteen_paging_nav(); ?>
  31. <?php else : ?>
  32. <?php get_template_part( 'content', 'none' ); ?>
  33. <?php endif; ?>
  34. </main><!-- .site-main -->
  35. </div><!-- .content-area -->
  36. <?php get_footer(); ?>