How To: Create Facebook Like Username URLs in WordPress

One of the great things about working with WordPress on a daily basis is I get to figure out how to do all sorts of fun things in WordPress! The latest challenge was figuring out how to setup Facebook like username URLs in WordPress. For example I wanted http://example.com/username to load the Author’s profile page. This was surprisingly much easier to accomplish than I assumed it would be. To do this visit Settings > Permalinks in the admin dashboard of WordPress and set your permalink custom structure to:

/%author%/%postname%/

That’s all there is to it! Now the user URL will be http://example.com/username just like in Facebook! To create a custom author page design simply edit (or create if it doesn’t exist) the author.php template file in your theme directory. Below is a screenshot of the custom permalink structure:

Facebook User URLs in WordPress

Enjoy this post? Be sure to subscribe to my RSS feed and my WordPress Tips and Tricks Newsletter! Also check out my WordPress books: Professional WordPress Third Edition & Professional WordPress Plugin Development

Comments

  1. Superb ! This is exactly what I am looking for .
    So If an author of a blog like somexblog.com/author could get a customers URL. Is there possibility to use it as openid ?

    Thank you !

  2. Can I set it as default behavior to all the sub-sites under my multi site?

  3. i want to do something like facebook