WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/author link

Description

Filter the URL to the author's page

<?php add_filter( 'author_link', 'filter_function_name' ) ?>

Parameters

$link
(string) (required) The URL to the author's page.
Default: None
$author_id
(int) (required) The author's id.
Default: None
$author_nicename
(string) (required) The author's nice name.
Default: None

Examples

Added to your child themes functions.php file, you can modify the author link for all posts or using conditional tags.

add_filter( 'author_link', 'modify_author_link', 10, 1 ); 	 	 
function modify_author_link( $link ) {	 	 
    $link = 'http://example.com/';
return $link;	 	  	 	 
}

Source File

author_link is located in wp-includes/author-template.php

Related

the_author(), get_the_author(), get_the_author_id(), the_author_link(), get_the_author_link(), the_author_meta(), get_the_author_meta(), the_author_posts(), get_the_author_posts(), the_author_posts_link(), get_author_posts_url(), get_the_modified_author(), the_modified_author(), wp_dropdown_users(), wp_list_authors()