Advertisement
Guest User

index.php

a guest
May 6th, 2014
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div class="wrapper section-inner">
  4.  
  5. <div class="content left">
  6.  
  7. <?php if (have_posts()) : ?>
  8.  
  9. <div class="posts">
  10.  
  11. <?php
  12. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  13. $total_post_count = wp_count_posts();
  14. $published_post_count = $total_post_count->publish;
  15. $total_pages = ceil( $published_post_count / $posts_per_page );
  16.  
  17. if ( "1" < $paged ) : ?>
  18.  
  19. <div class="page-title">
  20.  
  21. <h4><?php printf( __('Page %s of %s', 'hemingway'), $paged, $wp_query->max_num_pages ); ?></h4>
  22.  
  23. </div>
  24.  
  25. <div class="clear"></div>
  26.  
  27. <?php endif; ?>
  28.  
  29. <?php while (have_posts()) : the_post(); ?>
  30.  
  31. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  32.  
  33. <?php get_template_part( 'content', get_post_format() ); ?>
  34.  
  35. </div> <!-- /post -->
  36.  
  37. <?php endwhile; ?>
  38.  
  39. <?php endif; ?>
  40.  
  41. </div> <!-- /posts -->
  42.  
  43. <?php if ( $wp_query->max_num_pages > 1 ) : ?>
  44.  
  45. <div class="post-nav archive-nav">
  46.  
  47. <?php echo get_next_posts_link( __('&laquo; Older<span> posts</span>', 'hemingway')); ?>
  48.  
  49. <?php echo get_previous_posts_link( __('Newer<span> posts</span> &raquo;', 'hemingway')); ?>
  50.  
  51. <div class="clear"></div>
  52.  
  53.  
  54.  
  55.  
  56. </div> <!-- /post-nav archive-nav -->
  57.  
  58. <?php endif; ?>
  59.  
  60. </div> <!-- /content.left -->
  61.  
  62. <?php get_sidebar(); ?>
  63.  
  64. <div class="clear"></div>
  65.  
  66. </div> <!-- /wrapper -->
  67.  
  68.  
  69. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement