Site logo

Archived topic

Change post author link to go to about pg instead of author archives

10 replies · Started by Mary on April 15, 2021

Viewing posts 1–11 of 11

Hi,
I want my post author link to go to my About page instead of to the author archives.

I tried this - but it didn't seem to work.

add_filter( 'author_link', 'my_author_link' );

function my_author_link() {
return home_url( 'about' );
}

Can you help me with this?

Thanks,
Mary

Hi Ying,

No go. I have that snippet in there now and it's not working. Can you take a look and see if you can get it to work?

Thanks.
Mary

Could you provide the user name as well?

Do you mean for the Wordpress login?

Admin

Yes, please.

Hi Mary,

Sorry, my bad, I misunderstood your last reply.

So I logged in, but I didn't see a code snippet been installed, how did you add the php snippet?

Here're some ways to add php snippet:
Adding PHP: https://docs.generatepress.com/article/adding-php/

Let me know :)

I added it to the CSS. Isn't that where it was supposed to go?

Hi Mary,

I added it to the CSS. Isn’t that where it was supposed to go?

The code you're trying to add is a PHP snippet. It won't work on the CSS code area.

As Ying mentioned, please see this link to get an idea on how to add PHP.
Adding PHP: https://docs.generatepress.com/article/adding-php/

Ah, I got it!

Thanks for your help.

Mary

No problem. :)

This archived topic is closed to new replies.