Adding pagination to list of posts