
In wordpress some people wants to create the community site and they want to create uniqe url for each user. In that time you need to remove the author word from wordpress permalink. Normally when we want to see the author URL then you can see URL as follows.
http://website.com/author/username/
If you can want to change the url to following
http://website.com/username
then you just need to edit only .htaccess file. Put following line in that file
RewriteRule ^author/(.+)$ http://www.yourblog.com/$1 [R=301,L] // change yourblog to website name
If you dont want to change the .htaccess file and still want to change the perlink structure then open the functions.php file from you wordpress theme folder.
add_filter('author_link', 'no_author_base', 1000, 2);
function no_author_base($link, $author_id) {
$link_base = trailingslashit(get_option('home'));
$link = preg_replace("|^{$link_base}author/|", '', $link);
return $link_base . $link;
}
add_filter('author_rewrite_rules', 'no_author_base_rewrite_rules');
function no_author_base_rewrite_rules($author_rewrite) {
global $wpdb;
$author_rewrite = array();
$authors = $wpdb->get_results("SELECT user_nicename AS nicename from $wpdb->users");
foreach($authors as $author) {
$author_rewrite["({$author->nicename})/page/?([0-9]+)/?$"] = 'index.php?author_name=$matches[1]&paged=$matches[2]';
$author_rewrite["({$author->nicename})/?$"] = 'index.php?author_name=$matches[1]';
}
return $author_rewrite;
}
Incoming search terms:
- hide admin author url wordpress plugin
- remove author from wordpress
- remove author wordpress plugin
- wordpress bookmark de permalink verwijderen
- wordpress remove author from url
- wordpress remove author on url






This website is awesome. I constantly come across something new & different right here. Thank you for that data.
How do i change it to where the users nickname is showing in the permalink instead of the login name? this is mainly for security purposes. your code word perfectly anf thanks for hack.
go to wordpress admin and left side you will find the users tab. Select the user and change the nickname as you need.
Something has gone terribly wrong with my blog after I inserted your code in my functions.php file. Now my ‘about-me’ page tries to resolve to /authoreric-evans and my /author/eric-evans tries to resolve to the same place. I need to get this fixed ASAP! Please help!
did you modified the .htaccess file also. If not then this code will never work. Other wise give me more details…so I can help
I’ve been checking your blog for a while now, seems like everyday I learn something new
Thanks
Awesome post. I so good to see someone taking the time to share this information