Change permalink structure with a function This snippet is a good start to see how we can programatically change the permalink...
Change author url base slug This rewrite function changes yoursite.com/author/name to yoursite.com/profile/name