Created pagination for posts