Add previous and next link to post detail page.
Don't access db too many times.