Change logic of adding and editing posts.