add tags function into posts