Implemented the new and create actions for posts.