Next/Previous links showing same posts
-
Clicking Next/Previous links goes to the next page, however it always show the same posts.
I’ve seen this problem in other threads, but none of the solutions seems to work, at least for me.
home.php code is:
<?php get_header(); ?> <div id="homepage"> <div id="contentleft"> <div class="postarea"> <?php /*Check for the 'gallery_styles' function. if it's there, then include it. If not, do nothing*/ ?> <?php if (function_exists('gallery_styles')) : ?> <div id="fcg"> <?php include (ABSPATH . '/wp-content/plugins/content-gallery/gallery.php'); ?> </div> <?php endif; ?> <div class="aheadline"> <h3>Featured News</h3> </div> <div style="clear:both;"></div> <!--This is where the thumbnails are found for the featured page - note the custom field name for this image is "thumbnail".--> <!--Replace cat=1 with the Category ID you want to display in this section.--> <?php $recent = new WP_Query("showposts=20"); while($recent->have_posts()) : $recent->the_post();?> <?php if( get_post_meta($post->ID, "thumbnail", true) ): ?> <a href="<?php the_permalink() ?>" rel="bookmark"> </a> <?php else: ?> <a href="<?php the_permalink() ?>" rel="bookmark"> </a> <?php endif; ?> <h1><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1> <?php the_content_limit(400, "[Read more]"); ?> <div style="border-bottom:1px dotted #BBBBBB; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div> <?php endwhile; ?> <div class="pagination"> <div class="palignleft"><?php previous_posts_link('« Previous Page') ?></div> <div class="palignright"><?php next_posts_link('Next Page »') ?></div> </div> </div> </div> <?php include(TEMPLATEPATH."/sidebar.php");?> </div> <!-- The main column ends --> <?php get_footer(); ?>
Thanks in advance
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Next/Previous links showing same posts’ is closed to new replies.