• Resolved erms2011

    (@erms2011)


    Hello,
    I have a page in my theme called ‘news’ that I want to have my blog posts display on (just an excerpt).
    It all works fine except when I go to the previous entries—it’s just a repeat of the posts from the first page rather than the older posts.
    I have set it to display three posts and yes, I have more than three posts to display.
    The url is changing with each previous page (/page2/page3 etc.) but the content remains the same.

    The code that I have on my news.php page template is here:
    https://pastebin.com/dnGWazQZ

    I have searched everywhere and can’t find a solution. Any thread I’ve found doesn’t fix the problem.
    Thanks for any help!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try changing line 4 from this

    <?php query_posts("posts_per_page=3"); ?>

    to this

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
          query_posts("posts_per_page=3&paged=$paged"); ?>
    Thread Starter erms2011

    (@erms2011)

    That did the trick! Thank you so much!!
    I never would have figured that out myself.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘'Previous entry' posts not showing up on previous pages’ is closed to new replies.