I would try something like,
SELECT ID, post_excerpt FROM wp_posts WHERE ID < $p ORDER BY ID DESC LIMIT 5
Where $p is the post ID of the post you're on currently. Let me know how this goes.
I would try something like,
SELECT ID, post_excerpt FROM wp_posts WHERE ID < $p ORDER BY ID DESC LIMIT 5
Where $p is the post ID of the post you're on currently. Let me know how this goes.
what about selecting n posts from x category?
Change the where clause to WHERE ID < $p AND post_category = 2 to select the 2nd category.
SELECT ID, post_excerpt FROM wp_posts WHERE ID < $p ORDER BY ID DESC LIMIT 5
Only seems to be working when you go to the "next" post.
This topic has been closed to new replies.