I’m making my first attempt at a paginated Wordpress wp_query page, but for some reason I just can’t get Wordpress to load the “next” links.
It’s a news page for a website, and I’m treating Wordpress’s Posts as the website’s news articles. So on this page, five posts should load, with their titles, dates, excerpts, and permalinks, then I’d like to have links appear at the end to allow users to view the previous five posts (or the next five posts, or both, as the case may be).
I’ve gotten everything working, but the “next” links.
The funny thing is that if I manually place myself on an older page (by adding ?paged=3 for example to my URL), I’m getting the “Newer Entries >” link fine. But that “Older Entries” isn’t showing up at all!
Any suggestions, anyone?
I’ve been googling this for a long while now and getting nowhere.
(arbitrarily hardcoding it to “20”), I get my “Newer Entries” links!
Problem is that obviously I can’t leave it with an arbitrary number.
I suppose I could find a way to determine the maximum number of posts and divide by “5” (my number of posts per page) to get the correct number of pages to enter into that function, right?
Well, we’ll see how that one goes.
Again, if anyone knows a more elegant or simpler solution, please share!