Created handling for adding and showing of posts.