factorized addPost as form, added posts on homepage