Archived topic
Linking author to about page
5 replies · Started by Chris on August 7, 2018
Hi,
Because of the recent Google update I want the link from my author name to link to my about page instead of the author archive. Is there an easy option for this?
Hi there,
Take a look at this post:
https://generatepress.com/forums/topic/create-author-page-author-php/
Let me know if this helps :)
Cool, yeah that's what I'm looking for.
The linked tutorial in that thread recommends creating a custom functions plugin. Is there way to do this without that plugin in GeneratePress? I like to limit the number plugins used.
Tutorial: http://justintadlock.com/archives/2013/01/29/how-to-change-your-author-archive-link
Quote:
"This tutorial will teach you a few techniques for dealing with this. Most of the code samples in this tutorial should go into a custom functions plugin...
...Point the URL to your “about” page
I like this option. Many sites have an “about” or “about me” page. This would be far more useful than another archive listing the same posts listed in your regular posts archive.
The following code will handle that scenario. Just replace about with the slug of the page you want to point to on your site.
add_filter( 'author_link', 'my_author_link' );
function my_author_link() {
return home_url( 'about' );
}
Hi there,
you could add it directly to your child theme function file:
https://docs.generatepress.com/article/adding-php/
The alternative offered is to use the Code Snippets plugin if you don't have a child theme.
Code is code, so it won't make a big difference as to how you add it. :)
I used the code snippet plugin and that did the trick. Cheers David, awesome support!
Glad we could help :)