
If you want to change the author link in the meta information of your WordPress posts (inside the red box in the image above), follow the following steps:
1. Create a child theme
A child theme is a theme which inherits its style and behaviour from its parent theme, but allows you to modify functions and styles. These changes are kept even after a theme is updated. If you don’t create a child theme, you’ll lose your changes when the theme is updated.
If you haven’t done it yet, you can create a child theme referring to How to create a child theme in Twenty Sixteen.
2. Add a filter to functions.php to modify your author link
Now you only have to add a filter, whose code follows, to your functions.php file of your child theme.
Go to Appearance->Editor in your WordPress dashboard, select the functions.php file and add the following code.
Replace http://www.mysite.com/mypage with the URL you like for your author link.
1 2 3 4 5 |
add_filter( 'author_link', 'modify_author_link', 10, 1 ); function modify_author_link( $link ) { $link = 'http://www.mysite.com/mypage'; return $link; } |
This filter has the effect of changing the author link in posts and pages.
References
- author_link on the WordPress Codex
- add_filter on the WordPress Codex