[resolved] Pagination with max number of pages? (3 posts)

  1. bythegram
    Posted 3 years ago #


    Just thought I'd ask while I do some hunting of my own;

    If I use pagination to show 10 posts a page is there a way to set the max number of pages? (If I have 40 posts but just want to show 30 spread onto 3 pages)

    Thanks in advance!

  2. bythegram
    Posted 3 years ago #

    FYI this became a non issue once I found a better solution

  3. bythegram
    Posted 3 years ago #

    In case anyone is curious here is a simplified version of the solution I used;


    Basically I used an "if" statement with the condition that any post less than 30 gets the normal information "else" (all posts over 30) I reset the wp query.

    Seems to be working great on my site but I haven't tested the simplified code so if you have troubles let me know.


Topic Closed

This topic has been closed to new replies.

About this Topic