Advertisement
Guest User

WP_PAGENAVI Error - Archive Page

a guest
Jan 8th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div class="l-inside">
  4. <article class="l-constrained">
  5.  
  6. <?php
  7. $arc_year = get_the_time('Y');
  8. $arc_month = get_the_time('m');
  9. $posts = query_posts( "year=$arc_year&monthnum=$arc_month" );
  10. $count = count($posts);
  11. ?>
  12.  
  13. <h2>
  14. Archive Results for <a href="<?php echo get_month_link($arc_year, $arc_month); ?>">"<?php the_time('F Y'); ?>"</a> <?php echo $count ?> Results Found
  15. </h2>
  16.  
  17.  
  18. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  19.  
  20. <section class="over-fix sub-header">
  21. <div class="postdate">
  22. <div class="date">
  23. <?php echo get_the_date('d M'); ?>
  24. </div>
  25. </div>
  26. <div class="title switch-links">
  27. <h1><a href="<?php the_permalink(); ?>" alt="<?php the_title_attribute(); ?>"><?php the_title();?></a></h1>
  28. </div>
  29. <div>
  30. <a class="button" href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">Read More…</a>
  31.  
  32. </div>
  33. </section>
  34.  
  35. <?php endwhile; ?>
  36.  
  37. <?php wp_pagenavi(); ?>
  38.  
  39. </article>
  40.  
  41. <?php get_sidebar(); ?>
  42. </div>
  43. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement