Hello WordPress Users,
I’m stuck with a problem building my wordpress website and I can’t figure out what to do about it.
Currently I’m showing 2 posts form the category ‘News’ at the page ‘News’. At the bottom of this page I want a Prev/Next button that shows the next or previous 2 posts from the same category.
So I was searching how I coud do that.
So I found this code:
previous_posts_link('Newer Entries »') next_posts_link('« Older Entries');
This displays a link like I was expecting.
But both links are not working (page reload, but same entry’s shown).
I also found this in this codex:
posts_nav_link('∞','Go Forward In Time','Go Back in Time');
Also at ‘Setting’ > ‘Reading’ I had set max posts to 2.
I don’t know how I can handle this.
Is there a way to show the next 2 (or ‘X’) posts from the same categorie when a button ‘Next’ or ‘Prev’ is pressed?
- The topic ‘Next/Prev posts on same page’ is closed to new replies.