How to deal with Next/Prev links on single post page
-
We are successfully using your plugin to list people in alphabetical order. We needed to implement a custom sort order, since the data field we were sorting on is not structured (i.e. the “last name / first name” information is not in a standardized position within the string. Your plugin ensures that names are displayed correctly.
So here’s the problem. Click on any of the links, and you will be taken to the correct post, where information about the person is shown. But above the post, you will see the “Next” and “Previous” links at the upper right corner. To a visitor, they assume that these Next and Previous links will display the details for the next or previous name from the list on the “summary” page. And in some cases, where the posts were created chronologically, the desired effect will be witnessed (but only by accident). However, if you start with “Arthur Hair” (the last person added to the list), what you will discover is the next or previous post from our WordPress site – with no regard to the filtering and sorting criteria that was used to display the list in the first place.
Do you have a method of “knowing” which post should be displayed when the “Next” and “Previous” links are activated (i.e. using information about the filtering and sorting conditions displayed on the summary page)?
I suppose a workaround would be to check the timestamps on the posts and artificially force these timestamps to be “chronologically ordered”. This would result in the Next and Previous links probably working as expected. However, once the beginning or end of the list was reached, there would be nothing prevent the Next and Previous links from continuing to deliver content – even though there is no more content available within the chosen filter.
- This topic was modified 2 years, 9 months ago by .
- This topic was modified 2 years, 9 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘How to deal with Next/Prev links on single post page’ is closed to new replies.