Site logo

[Resolved] Linking author to about page

Home Forums Support [Resolved] Linking author to about page

Home Forums Support Linking author to about page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #642256
    Chris

    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?

    #642452
    Leo
    Staff
    Customer Support

    Hi there,

    Take a look at this post:
    https://generatepress.com/forums/topic/create-author-page-author-php/

    Let me know if this helps 🙂

    #643028
    Chris

    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' );
    }
    #643154
    David
    Staff
    Customer Support

    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. 🙂

    #643928
    Chris

    I used the code snippet plugin and that did the trick. Cheers David, awesome support!

    #644200
    Leo
    Staff
    Customer Support

    Glad we could help 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.