Advertisement
cw17s0n

pagination issue

Jun 22nd, 2012
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.91 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <!--<p>archive-questions.php</p>-->
  3. <!-- Left Nav -->
  4. <nav class="alignLeft">
  5.     <?php include @ ("leftnav.php"); ?>
  6. </nav>
  7. <div id="contentContainer" class="alignLeft">
  8.     <div class="twoThirdsColumn alignLeft"> <!-- Center Column -->
  9.         <div class="colTopHeader">
  10.             <h2>Best Questions</h2>
  11.             <div class="clear"></div>
  12.         </div>
  13.  
  14. <?php
  15.         $paged = get_query_var('paged');
  16.         $wp_query = new WP_Query(array(
  17.         'post_type' => 'questions',
  18.         'posts_per_page' => 8,
  19.         'paged' => $paged
  20.     ));
  21.         while ($wp_query->have_posts()) : $wp_query->the_post();
  22. ?>
  23.  
  24.     <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  25.         <?php the_title('<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark">', '</a></h2>'); ?>
  26.         <span class="pubDate"><?php the_time('F j, Y  ');?><?php echo get_the_term_list( $post->ID, 'postauthor', ' ', ', ', '' ); ?></span>
  27.                
  28.         <?php if ( has_post_thumbnail() ) { ?>
  29.             <div class="alignLeft postThumb">
  30.                 <?php the_post_thumbnail('thumbnail'); ?>
  31.             </div>
  32.             <?php } ?>             
  33.         <?php the_excerpt(); ?>
  34.     </div>
  35.                
  36.     <?php endwhile; ?>
  37.    
  38. <div class="navigation">
  39.     <div class="alignLeft next-posts"><?php next_posts_link('&laquo; Older Questions', 0); ?></div>
  40.     <div class="alignRight prev-posts"><?php previous_posts_link('Earlier Questions &raquo;', 0); ?></div>
  41. <div class="clear"></div>
  42. </div>
  43.        
  44. </div>
  45.  
  46. <div class="oneThirdColumn alignLeft"> <!-- Rigth Column -->
  47.     <div class="colTopHeader">
  48.         <h2>Share A Question</h2>
  49.         <div class="clear"></div>
  50.     </div>
  51.  
  52.     <!-- Quick Post for Best Questions -->
  53.     <?php dynamic_sidebar( 'first-footer-widget-area' ); ?>
  54.  
  55.    
  56.     <div class="colTopHeader">
  57.         <h2>Filter Best Questions</h2>
  58.         <div class="clear"></div>
  59.     </div>
  60.  
  61.     <!-- Faceted Search -->
  62.     <?php dynamic_sidebar( 'secondary-widget-area' ); ?>
  63. </div>
  64. </div>
  65. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement