DRY up the post writing code
DRY up the code to get the title