Cover Header Image

Redirect Author Archive Link to Another Page

By default, WordPress will archive your posts and organize them by authors. In a multi-author environment, this can be really useful – by simply clicking on author’s name which is usually found on the top or on the bottom of the post, you will be redirected to the archive page which lists all posts written by that person.

But what if you are a single author? That means that a link to your archive page leads to the same blogroll you already have on your homepage or blog page (depending on your site organization) and that doesn’t make sense. Instead, you may want to redirect your users to another page – for example “About me” page where you can tell your visitors more about yourself or provide some extra information about your posts, business or whatever you want.

How to Use

To use this custom code snippet with your WordPress theme, simply paste the code into your functions.php file or using the Code Snippets WordPress plugin. To find out more about adding custom code snippets to your functions.php file see our tutorial How to Edit the WordPress Functions File for more information.

Warning

If you don't feel comfortable with editing the functions.php file directly, we would recommend you use the Code Snippets plugin. This plugin will enable you to easily add, manage and delete WordPress code snippets from your dashboard. To find out more about adding custom code snippets using a plugin see our tutorial How to Add Custom Code Snippets to WordPress with the Code Snippets Plugin for more information.

Code Snippet

Important

In this tutorial, we'll be directly editing WordPress theme files and we recommend that you create a child theme of your existing parent theme. By using a child theme you will be able to apply modifications without altering the parent theme files and ensuring any changes you make are kept following any parent theme updates.

/**
 * https://wpsnip.com/redirect-author-archive-link-to-another-page-without-plugin/
 */
// Redirect Author Archive Link To Another Page
add_filter( 'author_link', 'redirect_link' );
function redirect_link() {
return home_url( 'about-us' );
} 
Was this article helpful?
YesNo
Share This....
Gilberto Van Roosen
Gilberto Van Roosen

Gilberto Van Roosen is the current editor-in-chief at WPSnip and leads a team of dedicated WordPress experts. He's an entrepreneur, online marketer, and professional blogger from London, United Kingdom. Gilberto found WordPress when he needed a website for his first business and instantly fell in love. When not building websites, creating content or helping his clients improve their online business, he can most often be found at the gym, or traveling the world with his wife and family.