Was wondering if anyone had any smart approaches to creating dynamic vanity user urls upon user registration. My site basically uses emails as usernames. I have the regex to strip the text before the “@” symbol (e.g. “name@email.com” becomes “name”) I would then like to take the “name” and create a vanity url (e.g. domain.com/name or name.domain.com)
Any thoughts on how to accomplish this with WordPress? I’m a pretty advanced WordPress user and my first thoughts were to do the following
- Verify user registration
- Upon successful user registration create page name with username as the title (this would help me achieve the http://www.domain.com/username)
- Apply preset template to that page with the desired view
Any and all thoughts are welcome.
I actually figured this out on my own. Just create a post like you normally would and but set the post type to page. Hope this helps someone out there.