• I’m trying to set a category page to be paginated, should the below not include next/previous posts via the <?php twentythirteen_paging_nav(); ?> line or am I missing something?

    <?php if ($this_page_id == 16) {  $categories = array(4,5,6,7); }
    				  elseif ($this_page_id == 209) {  $categories = 6; }
    				  elseif ($this_page_id == 211) {  $categories = 5; }
    				  elseif ($this_page_id == 213) {  $categories = 7; }
    			?>
    			<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    			      $the_query = new WP_Query( array (  'posts_per_page' => -1, 'category__in' => $categories, 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1)) ); $i= 2; ?>
    			<?php while ( $the_query->have_posts() ) : $the_query->the_post(); 	$id = get_the_ID();  ?>
    			<?php if ($i % 2 == 0) { echo '<div class="centered inner"><div class="whole-post">'; }
    				  else { echo '<div class="blue-content color-grey"><div class="centered inner"><div class="whole-post">'; } ?>
    				  <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    				 <div class="post-info">Posted <?php the_time('F jS, Y'); ?><?php /* &nbsp;|&nbsp; Author: <?php the_author();  */?></div>
    				 <div class="post-content"><?php the_content(); ?></div><div style="padding: 20px 0 0 0; clear: both;"><?php echo do_shortcode("[ssba]"); ?></div>
    			<?php if ($i % 2 == 0) { echo '</div></div>'; } else { echo '</div></div></div>'; } ?>
    			<?php $i++; ?>
    			<?php endwhile; ?>
    		<?php twentythirteen_paging_nav(); ?>
  • The topic ‘Paginated category page’ is closed to new replies.