Added pagination to posts