Added pagination to list posts.