• Resolved Chris_OH

    (@chris_oh)


    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 ]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Does the template file in question contain a custom query?

    Thread Starter Chris_OH

    (@chris_oh)

    <?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);
    ?>
    Thread Starter Chris_OH

    (@chris_oh)

    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

    Glad I could help 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Next page previous page’ is closed to new replies.