paged post list and single post
-
I have a layout with two divs – the left shows a list of post thumbnails, with previous and next paging, the second div shows the selected post.
The problem I’m trying to figure out is that if i am on the second page of posts and select one, the post loads, but the left div pagination is reset to the first page, instead of ‘remembering’ which page it was on.
This is how the list is called:
$temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('category_name=thumbnail'.'&showposts=9'.'&paged='.$paged); ?> <a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"> <!--code to call a thumbnail here--> </a> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php previous_posts_link('« Previous') ?></div> <div class="alignright"><?php next_posts_link('More »') ?></div>
The post itself is called like this:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post_full" id="post-<?php the_ID(); ?>"> <?php the_content(); ?> <?php endwhile; else: ?> <?php endif; ?>
I’m thinking maybe there is a better way I could be doing this. Any suggestions?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘paged post list and single post’ is closed to new replies.