I have been digging around the various information on paging in the word press codex and forums and am having trouble finding an answer. It’s possible that I am not understanding the issue correctly.
I have a category which I display on my site as a single page. It is using a dedicated template page “category-8.php” to display posts in a different way. You can view it here:
To display just the items from my portfolio I am using the following code:
<?php query_posts('category_name=Portfolio&showposts=8'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post-wrap" id="post-<?php the_ID(); ?>"> <h3 class="post-title clear"><?php the_title(); ?></h3> <p class="index-meta"><?php the_time('F Y'); ?></p> <div class="story-content"> <?php the_content('Continue Reading »'); ?> <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?> </div><!-- end post content --> </div><!-- end post --> <?php endwhile; ?> <div class="nav"> <div class="previous"><?php next_posts_link('« Previous') ?></div> <div class="next"><?php previous_posts_link('Next »') ?></div> </div> <?php else : ?> <h2 class="post-title"><?php _e('Not Found'); ?></h2> <p><?php _e("Sorry, but you are looking for something that isn't here. Double check your URL or you should try searching for it."); ?></p> <?php @include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?>
The problem lies with attempting to view page 2 of the portfolio. When you go to the 2nd page it just displays the first 8 posts all over again.
Other paging in effect on the site seems to work fine, I assume it is a problem with my category-8.php file but am unsure what. Any advice would be greatly appreciated.
- The topic ‘Paging Issue on Category Template’ is closed to new replies.