WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Looking for a way to on single.php fetch and show the actual post, and then by looking on the menu_order value of that specific post (lets say the post have menu_order value 3 in this case) go and fetch the 2 posts before that one i.e. the posts with menu_order value 1 and 2. Also fetch 2 posts after, i.e. the posts with the value 4 and 5. And how you'd check to see if there even are as many as +/- 2 posts in relation the the current post.

Anyone have an idea how to sort that out?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.