Added pagination for posts