Functions.php theme code not working

[ad_1]

I’m trying to have my author bio links go to a custom page rather than WordPress’s prebuilt page.

I’m using Astra, and and the active theme is a child theme.

I’ve added the following code into the functions.php file on the child theme:

add\_filter( ‘author\_link’, ‘my\_author\_link’ );
function my\_author\_link() {
return home\_url( ‘/about-us/authorsname/’ );
}

On my staging site, this code works great. On a test site that I have (different theme) this code also works great. However, on my live site, it doesn’t work at all. Nothing breaks, but the author pages doesn’t change.

I’ve edited the code using FileZilla (FTP), and confirmed the code is in place by looking in the file manager.

I can’t seem to find any information on what could be the cause. Any input would be greatly appreciated.

[ad_2]
1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer