index.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * The main template file
  4. *
  5. * This is the most generic template file in a WordPress theme and one
  6. * 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 http://codex.wordpress.org/Template_Hierarchy
  11. *
  12. * @package WordPress
  13. * @subpackage Twenty_Fourteen
  14. * @since Twenty Fourteen 1.0
  15. */
  16. get_header(); ?>
  17. <div id="main-content" class="main-content">
  18. <div id="primary" class="content-area">
  19. <div id="content" class="site-content" role="main">
  20. <?php
  21. if ( have_posts() ) :
  22. // Start the Loop.
  23. while ( have_posts() ) : the_post();
  24. /*
  25. * Include the post format-specific template for the content. If you want to
  26. * use this in a child theme, then include a file called called content-___.php
  27. * (where ___ is the post format) and that will be used instead.
  28. */
  29. get_template_part( 'content', get_post_format() );
  30. endwhile;
  31. if (function_exists("pagination")) : pagination(); endif;
  32. else :
  33. // If no content, include the "No posts found" template.
  34. get_template_part( 'content', 'none' );
  35. endif;
  36. ?>
  37. </div><!-- #content -->
  38. </div><!-- #primary -->
  39. <?php get_sidebar( 'content' ); ?>
  40. </div><!-- #main-content -->
  41. <?php
  42. get_sidebar();
  43. get_footer();