Is it possible to nest get_previous_post()?
As I previously said in a comment You are using invalid values in get_previous_post() and get_next_post(). You are better of here writing your own function I came up with the following. : Get an array of all the posts and determine the current post’s position. Get the post ID’s of the posts on both sides … Read more