On my single.php page I’m displaying 2 loops – one for the primary post and another which secondary loop which displays excerpts of 3 other posts. This is done chronologically on the homepage (as it should), but on the single.php page I want the secondary posts to be relative(and previous) to the primary post on this page (not chronological, necessarily).
In other words, I want a loop of the 3 previous excerpts to be showing on the single.php pages.
I’m using ‘offset’ on the homepage, but I don’t know how to get it to work any other way than chronologically. Many thanks!
- The topic ‘Displaying next and previous posts in relation to the post being viewed’ is closed to new replies.