index.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php get_header(); ?>
  2. <?php get_template_part( 'content', 'featured' ); ?>
  3. <?php do_action( 'foto_before_content' ); ?>
  4. <section id="content" class="site-content" role="main">
  5. <?php do_action( 'foto_before_article' ); ?>
  6. <?php
  7. $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
  8. $args = array(
  9. 'paged' => $paged,
  10. 'post__not_in' => get_option( 'sticky_posts' )
  11. );
  12. $post_query = new WP_Query( $args );
  13. if ( $post_query->have_posts() ) : ?>
  14. <?php while ( $post_query->have_posts() ) : $post_query->the_post(); ?>
  15. <?php get_template_part( 'content' ); ?>
  16. <?php endwhile; ?>
  17. <?php foto_content_nav( 'nav-below' ); ?>
  18. <?php elseif ( current_user_can( 'edit_posts' ) ) : ?>
  19. <?php get_template_part( 'no-results', 'index' ); ?>
  20. <?php endif; ?>
  21. <?php do_action( 'foto_after_article' ); ?>
  22. </section><!-- end #content .site-content -->
  23. <?php do_action( 'foto_after_content' ); ?>
  24. <?php get_footer(); ?>