How do I add next previous links after a fixed number of posts on a page? (3 posts)

  1. charles_i
    Posted 2 years ago #

    Can't seem to find this anywhere. Every search comes up with how to add next/previous for a blog page and that the number of posts is controlled in the Dashboard. But this is not a blog page this a page called "News" which contains Posts from the News Category. If I want next/previous after 5 posts how do I do it? Do I need to write a counter on the page?


  2. Tara
    Volunteer Moderator
    Posted 2 years ago #

    which theme are you using?

  3. charles_i
    Posted 2 years ago #

    It's not really specific to one theme. I am trying to do this on two different WP sites. One of them is a purchased theme and the other one I built myself. Both of these websites have similar structure, a page of News posts, a page of Upcoming Events posts etc. At some point the page needs to be broken into previous and next pages so there aren't hundreds of entries on one page.

    How do I do this in the code? Is there a function to setup, or a PHP code for the page template that can be set to number of posts (like the Dashboard does)? Or both?

    Which also makes me wonder, in a related question, when you configure 'Blog pages show at most x number' where exactly in the theme files is this activated? Is it 'blog.php'? Any other theme files?

    I'm surprised this isn't a very common thing to do.

Topic Closed

This topic has been closed to new replies.

About this Topic