Query Page Query Posts. Next and Previous Post links not working properly.
-
Hi,
I have some custom pages that first call for page content, then the custom pages call for posts from a specific category.Problems:
- The ‘Previous Posts’ and ‘Next Posts’ links are showing up after every post.
- When clicking on ‘Previous Posts’ or ‘Next Posts’ I get the same first 7 posts. There are 10 there. I am not truly ‘seeing’ the second page. However, the link does change from ‘Previous’ to ‘Next’
Here is the PHP being used for this:
<?php $page_62 = new WP_Query('page_id=62'); $page_62->the_post(); ?> <h1><span><?php the_title(); ?></span></h1> <?php the_content( ); ?> <?php if(have_posts()) : ?> <?php query_posts('cat=12&order=ASC'); ?> <?php while(have_posts()): the_post(); ?> <h3><span><?php the_title(); ?></span></h3> <?php the_content( ); ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('Previous Posts') ?></div> <div class="alignright"><?php previous_posts_link('Next Posts') ?> </div> </div> <?php endwhile; ?> <?php else : ?> <p>There are currently no Small Dogs available for adoption.</p> <?php include (TEMPLATEPATH . "/notfound.php"); ?> <?php endif; ?>
Any help on this would be greatly appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Query Page Query Posts. Next and Previous Post links not working properly.’ is closed to new replies.