Filtering Pagination on single.php?
-
Hi there, I have a doubt with something that is not working as it should be, or maybe I’m confused to not think clearly and find the response, I have a blog.php document where I call my blog articles under the “blog” category, I call all the articles under that category with this:
<?php query_posts('cat=9&order=DSC&showposts=14&paged='.get_query_var('paged')); ?>
Then I have all my regular loop, then, those articles link to my single.php file where I have the regular loop:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_post_thumbnail('full', array('class' => 'img-responsive')); ?> <h1><?php the_title(); ?></h1> <?php the_content(); ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?>
But then if I add a pagination links the pagination will “call” posts that are not inside the blog category, as pagination I’m using
<?php previous_post('? ? %', '', 'yes'); ?> <?php next_post('% ? ? ', '', 'yes'); ?>
I just want to paginate only thru my “blog” category articles, wondering if there’s a way to filter the pagination by category?
Thanks everybody!
A.
- The topic ‘Filtering Pagination on single.php?’ is closed to new replies.