
Have you noticed our author archive link? It’s redirecting to our about page. Last day, one of our users asked that how we redirected our author archive link. In this post, we will show you how can you redirect author link in WordPress without using any plugins.
When You Need To Redirect Author Link
If you are handling a single author blog or not accepting guest posts, you will need to redirect the author link. When you run a single author blog and using the normal author archive URL, when a user clicks on the link, they will see a 404 error page. To prevent this, you need to redirect your author link to about page or home page.
It will also help you to secure your WordPress blog. Well if you are running a multi-author blog, you don’t need to redirect author link of your blog.
How To Redirect Author Link In WordPress
First of all, go to your WordPress dashboard and theme editor.
There, you need to choose the functions file.
Add the below code on the file and save it.
add_filter( 'author_link', 'my_author_link' ); function my_author_link() { return home_url( 'about-us' ); }
Before updating the file, your author URL will be like www.example.com/author/christina. After adding the code, your author URL will redirect to the specific URL.
You need to replace the about-us in the code with your own page link. Check your page from your the front end.
We hope you found this post helpful and learned how can you redirect author link in WordPress blog. If you did, please consider sharing this post with your friends and fellow bloggers. For more tutorials, you need to check out our blog section.
Aa related WordPress guides, we recommend you check out how can you create a child theme and how to configure Social Warfare WordPress plugin.
Thank you, Christina.
I was running a single author blog and this tip helped me a lot.
Expecting more Genesis tips from you!
Hi Ahmed,
Glad you found us helpful.
We have more Genesis posts in the queue.
Keep in touch.
Got the post at the right time!
Thanks.
What’s your opinion about the best plugins for WordPress?
Hi Dave,
We have already covered it. Please see the must-have WordPress plugins in 2019.
Also, check the AWPGuide Blueprint page.
There, we will share the same plugins and tools that we use here!
Simple post.
Thanks.
Hi Asim,
Glad to hear that!
OMG, it is working!
I am running a single author blog and it helped me to redirect the author URL to my portfolio page.
Thanks.
Glad to hear that, James.