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

Related posts:

  1. How To: Create Custom ASP URLs with Querystrings using ISAPI Rewrite
  2. How To: Create ASP and AJAX username availability check example
  3. How To: Create Backdoor Admin Access in WordPress
  4. Custom Post Type UI Plugin for WordPress
  5. Professional WordPress Plugin Development Has Hit The Shelves!
Enjoy this post? Be sure to subscribe to my RSS feed and my WordPress Tips and Tricks Newsletter! Also check out my new book: Professional WordPress

Comments

  1. helpin says:

    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. helpin says:

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

  3. isyraf says:

    i want to do something like facebook

Trackbacks

  1. [...] This post was mentioned on Twitter by Brad Williams, Patrick O'Keefe, Mark McWilliams, sparkbloom, Planet WordPress and others. Planet WordPress said: Brad Williams Blog: How To: Create Facebook Like Username URLs in WordPress http://goo.gl/fb/HhKsE [...]

Speak Your Mind

*