Adds new-post function