index.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. * @package Canard
  12. */
  13. get_header(); ?>
  14. <?php
  15. if ( is_home() ) {
  16. // Include the featured content template.
  17. get_template_part( 'featured-content' );
  18. }
  19. ?>
  20. <div class="site-content-inner">
  21. <div id="primary" class="content-area">
  22. <main id="main" class="site-main" role="main">
  23. <?php if ( have_posts() ) : ?>
  24. <?php /* Start the Loop */ ?>
  25. <?php while ( have_posts() ) : the_post(); ?>
  26. <?php
  27. /* Include the Post-Format-specific template for the content.
  28. * If you want to override this in a child theme, then include a file
  29. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  30. */
  31. get_template_part( 'content', get_post_format() );
  32. ?>
  33. <?php endwhile; ?>
  34. <?php the_posts_navigation(); ?>
  35. <?php else : ?>
  36. <?php get_template_part( 'content', 'none' ); ?>
  37. <?php endif; ?>
  38. </main><!-- #main -->
  39. </div><!-- #primary -->
  40. <?php get_sidebar(); ?>
  41. </div><!-- .site-content-inner -->
  42. <?php get_footer(); ?>