eighteesix on "issue with older entries"
February 16, 2010 by David Olsen
Hope somebody can tell me what is wrong here. This loop displays the latest 5 posts, and also displays an “Older Entries” link. this link points to mysite/blog/page/2/. But this shows me the exact same 5 posts as the previous page (mysite/blog/).
Note: the /blog/ page is a Page with a custom template (called blog.php).
heres the loop i put in blog.php:
<?php if (have_posts()) : ?>
<?php query_posts('cat=3'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class=regular><div class=date><span style='color:#999; text-transform: lowercase;'><php the_bookmark_links(); ?><?php the_author() ?> | <?php the_time('M Y') ?></span></div><?php the_title(); ?><p><p><?php the_content('Read the rest of this entry »'); ?></p><?php if (function_exists('sociable_html')) { echo sociable_html(Array("Facebook", "Twitter", "MySpace", "del.icio.us", "Google", "Mixx", "Digg", "RSS", "email", "Print")); } ?></p>
<p class="postmetadata"><?php edit_post_link('Edit', '', ' | '); ?><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>
</p>
</div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
<?php endif; ?>
would really appreciate any help.





Comments
Facebook comments:
Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!