Site logo

Archived topic

How to change author URL to "About Page"?

7 replies · Started by Tom on January 19, 2021

Viewing posts 1–8 of 8

Hi there,

Do you only have one author?

Let me know :)

Hmm, right now only 1 author (me) but I intended to add additional authors soon.

Really, what I'm concerned with is the SEO impact - if Google is crawling the author link and not finding the about page after.

Preferably, if there's a way to customize the link URL for each author to a specific page, that would be ideal.

Gotcha. Works for a single author. For multiple authors, seems like I could use an IF statement and use the same replacement code to give them a custom URL page. If so, what field should I put in the IF statement?

I believe this should work:

add_filter( 'generate_post_author_output', function( $output ) {    
    if ( '2' == $author_id ) {
        return '<a href="MY CUSTOM URL">My Name</a>';
    }
} );

Great thanks, I'll try that for my next author.

No problem :)

This archived topic is closed to new replies.