Solution: Remove Author Slug / Base / Prefix
-
Hi,
I’m not asking a question. I was looking for ages for a simple solution to a problem and couldn’t find anything that worked. Until I stumbled on a way to do it which was really by chance rather than brilliant Google research.
Basically I had the request from a client to remove the slug / base/ prefix for authors in WordPress. So that the author.php pages loaded for usernames straight on the domain:
standard way: domain.com/author/bubba
requested way: domain.com/bubbaBasically the client wants to promote the authors in print material with a nice short domain name. The people are the service of the business if that makes sense.
Anyway I tried the functions.php code listed in Stack Overflow articles and other blog posts and it didn’t work. I just got 404 errors.
And when I was going to give up I came across this:
http://ww.wp.xz.cn/extend/plugins/wp-htaccess-control/
HTaccess Control plugin simply removes the slug for authors as part of it’s default settings.
I know plugins are not the best approach for building sites. But this solved a problem I could not find a way round.
All of the Stack Overflow articles were closed to comments so posting here will hopefully help other people who were in a similar situation to me.
Cheers,
Nick.
The topic ‘Solution: Remove Author Slug / Base / Prefix’ is closed to new replies.