add previous and next functionality to posts