WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/get author posts url

Contents

Description

Gets the URL of the author page for the author with a given ID.

Usage

<?php get_author_posts_url$author_id$author_nicename ); ?>

Parameters

$author_id
(integer) (required) ID of the author whose URL should be retrieved.
Default: None
$author_nicename
(string) (optional) User nicename.
Default: empty

Return Values

(string) 
The URL to the author's page.

Examples

Display the link of the author page for the author of the current post

<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta( 'display_name' ); ?></a>

Source File

get_author_posts_url() can be located in wp-includes/author-template.php

Related

the_author(), get_the_author(), 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()

See also index of Function Reference and index of Template Tags.