How to Remove the Author Base with Edit Author Slug (Update: No longer supported)

Update: As of version 0.7.x+, this no longer works (2011-02-15).

Edit Author Slug 0.6 brings with it a new “feature.” I put “feature” in quotes, because it’s not one you would know existed if it aren’t someone who goes digging around other’s code. With this new version of Edit Author Slug (at the request of Mark), you can now remove the author base entirely from your WordPress author links. Instead of http://www.example.com/author/mark/, you can have http://www.example.com/mark/. However, due to the way WordPress handles its rewrite rules, removing the author base could have negative consequences when it comes to accessing your site. It is possible, although not highly likely, that you could end up on a page, or even a post, rather than the intended author page. In order to avoid support requests that are likely to crop up if this were a visible feature, I’ve decided to leverage WordPress’ wonderful action/filter system to add a barrier to entry for this feature. The idea is that if you can’t add the proper code to your functions.php, or write a plugin to add the necessary code, you probably aren’t ready for the consequences of removing your author base. Now, with a strong disclaimer of ,”Use at your own risk!,” I give you

add_filter( 'baeas_remove_author_base', __return_true );

Assuming you’re using WP 3.0.x or greater (and you are, aren’t you?), just add this to your functions.php or a custom plugin. Once you’ve added the code, go to your make Permalinks page in the dashboard, make sure the “Author Slug” field is blank, then click the “Save Changes” button at the bottom of the page. You should find the author base section of your permalinks gone!