Adds create new post function