Chris_OH
Member
Posted 8 months ago #
I'm having trouble getting the next page of posts to show on my site. THis is how it is now. Any time i mess around with php next posts, and the link appears at the bottom, it just brings me to a 2nd page (according to browser) but it is in fact same first age posts. What do i do to fix this?
[code moderated - please follow the forum guidelines for posting code http://codex.wordpress.org/Forum_Welcome#Posting_Code ]
Does the template file in question contain a custom query?
Chris_OH
Member
Posted 8 months ago #
<?php query_posts('showposts='.$recent_posts_number); ?>
this, but if i take it out, the whole site no longer works
Try replacing that line with:
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args= array(
'posts_per_page' => $recent_posts_number,
'paged' => $paged
);
query_posts($args);
?>
Chris_OH
Member
Posted 8 months ago #
You sir are a saint! thanks so much. the site is cosmictreadmill.co.uk and if you're into comics you'll love it.
thanks again, this is really appreciated