index.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 Spun
  12. */
  13. get_header(); ?>
  14. <div id="primary" class="content-area">
  15. <div id="content" class="site-content <?php if (!is_front_page()):?> site-content-background <?php endif; ?>" role="main">
  16. <?php if ( is_home() && ! is_paged() ) : ?>
  17. <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
  18. <?php endif; ?>
  19. <?php if ( have_posts() ) : ?>
  20. <?php /* Start the Loop */ ?>
  21. <?php while ( have_posts() ) : the_post(); ?>
  22. <?php
  23. /* Include the Post-Format-specific template for the content.
  24. * If you want to overload 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', 'home' );
  28. ?>
  29. <?php endwhile; ?>
  30. <?php spun_content_nav( 'nav-below' ); ?>
  31. <?php elseif ( current_user_can( 'edit_posts' ) ) : ?>
  32. <?php get_template_part( 'content', 'none' ); ?>
  33. <?php endif; ?>
  34. </div><!-- #content .site-content -->
  35. </div><!-- #primary .content-area -->
  36. <?php get_sidebar(); ?>
  37. <?php get_footer(); ?>