Can anybody look at the following codes? After I excluded the category 15, the next_posts_link does not work, nor does the page navigation plugin. When I click the page 2, 3,4, it only display the posts in page 1.
<?php query_posts('cat=-15'); ?>
开发者_JS百科 <?php while (have_posts()) : the_post(); ?>
... ....
<?php endwhile; else: ?>
<?php next_posts_link() ?>
<?php endif; ?>
How about...
<?php query_posts('cat=-15'); ?>
<?php while (have_posts()) : the_post(); ?>
... ....
<?php endwhile; ?>
<?php next_posts_link() ?>
<?php endif; ?>
??
Try it like this:
<?php query_posts(array( 'cat' => -15, 'paged' => get_query_var('paged') ) ); ?>
This should work.
精彩评论