Skip to content

Instantly share code, notes, and snippets.

@wpgaurav
Created September 21, 2022 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpgaurav/6e9c85719c70a4d325fc9d47821f04c8 to your computer and use it in GitHub Desktop.
Save wpgaurav/6e9c85719c70a4d325fc9d47821f04c8 to your computer and use it in GitHub Desktop.
Redirect Author Archives to ‘About’ page
<?php add_filter( 'author_link', 'my_author_link' ); function my_author_link() { return home_url( 'about' ); } ?>
@wpgaurav
Copy link
Author

For a blog with single author, there is no need of Author archives as the same can be achieved by regular archives. It’s better suggested to redirect Author archives to your own about page. Put the above code inside your theme’s functions.php file.

@wpgaurav
Copy link
Author

Here about is the slug at which your about page is located.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment