more progress on post function

added sync func

added func to fill a post template