comment the code much better
slight refactor: put getCategories, getOtherTitles under wp object