I would separate fetching the post from the DB and displaying them.