lockdownd7 Posted April 28, 2009 Share Posted April 28, 2009 I've got a wordpress blog set up, everything's great, however, now that I have more than 10 blog posts, it obviously adds the "next page" link at the bottom so users can go back and look at older entries. However, when you click this link, although it goes to page 2, it simply repeats the most recent 10 posts, which is obviously redundant and wrong. I would really appreciate any help anyone can provide. Even if you don't know what the problem is, if you can recommend a workaround for it in the meantime, that would be fine. Here is the code from the index.php file. I'm not sure that this is where the error is, so if you need to see other code, let me know. <?php include_once('header-index.php'); ?> <div id="midle" class="fl mgright"> <div class="spacer"> <?php if (have_posts()) : ?> <?php query_posts('cat=all'); ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <div class="postdata"> <ul> <li class="time"><?php the_time('F jS, Y') ?></li> <li class="posted">Posted in <?php the_category(', ') ?></li> <li><?php edit_post_link('Edit', '', ''); ?></li> </ul> </div> <?php the_content('<img src="' . get_bloginfo('template_url') . '/img/rmore.gif" alt="'. get_the_title() .'" />', '', '');?> <div class="clr"></div> </div> <?php endwhile; ?> <div id="navigation"> <div class="alignleft"><?php previous_posts_link('<img src="' . get_bloginfo('template_url') . '/img/prev.gif" alt="previous post" />', '', '') ?></div> <div class="alignright"><?php next_posts_link('<img src="' . get_bloginfo('template_url') . '/img/next.gif" alt="next post" />', '', '') ?></div> <div class="clr"></div> </div> <?php else : ?> <div class="post"> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> </div> <?php endif; ?> </div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/156039-wordpress-problem-blog-posts-on-second-page-repeat/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.