Add code to create and update posts