Sorting Previous/Next Post Links Based on Values Stored in Another Table
-
Dear all,
Is it possible to sort the post navigation links (previous/next) based on values stored in another table? I’m using Q2W3 Post Order plugin for WordPress to sort posts based on category. On the category archive pages, this plugin outputs posts as sorted by the plugin but on single post pages, the “previous/next” navigation links jump here and there instead of following the same post order as arranged by the plugin.
Here’s how this plugin works:-
This plugin allows a drag-drop interface to change the default post order and modifies the standard taxonomy output so that posts on the taxonomy (e.g. category) archive pages are shown as ordered by the plugin. This plugin has a table called
q2w3_post_order
where it stores the following details:-id, post_id, term_id, post_rank, taxonomy, post_type
The post_id contains the ID of the post, term_id contains the category ID by which the post is sorted, post_rank contains the position of the post in a category listing (posts with lowest position numbers are displayed at the top) and taxonomy contains the taxonomy name by which the posts are sorted (in this case, category).
This works flawlessly on the category archive pages. The posts are showed as sorted by their positions but as soon as you visit the single post page, the previous/next links (which are configured to only navigate within the existing category) no longer follow this order.
Could you please help me out with this so it’s possible to have the previous/next links follow the sorting order by the post_rank values stored in the q2w3_post_order table?
Thanks a bunch!
- The topic ‘Sorting Previous/Next Post Links Based on Values Stored in Another Table’ is closed to new replies.