the_author_posts_link [ WordPress Function ]
| Parameters: |
|
| Uses: |
|
| Links: | |
| Defined at: |
|
Display an HTML link to the author page of the author of the current post.
Does just echo get_author_posts_url() function, like the others do. The reason for this, is that another function is used to help in printing the link to the author's posts.
Source
<?php
function the_author_posts_link($deprecated = '') {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.1' );
global $authordata;
if ( !is_object( $authordata ) )
return false;
$link = sprintf(
'<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
get_author_posts_url( $authordata->ID, $authordata->user_nicename ),
esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
get_the_author()
);
echo apply_filters( 'the_author_posts_link', $link );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/the author posts link « WordPress Codex
Description. Displays a link to all posts by an author. The link text is the user's Display name publicly as field. The results of clicking on the presented link will be ...
codex.wordpress.org - WordPress › Support » Tags — the_author_posts_link
Register · WordPress › Support » the_author_posts_link ...
wordpress.org - php - Wordpress the_author_posts_link - Stack Overflow
Why not work with an existing wordpress template tag?: Template Tags/wp list authors « WordPress Codex. Edit: Gravatars: Search WordPress ...
stackoverflow.com - the_author_posts_link() for authors of custom post types ...
Aug 24, 2011 ... share [g+] share [fb] share [tw]. I have both regular blog posts and a custom post type in a blog. The page template shows the author posts link.
wordpress.stackexchange.com
Kullanýcý Tartýþmalarý [ wordpress.org ]
- alchymyth on "Author Name Isn't Showing Up in Archives"
- elemjosh on "Author Name Isn't Showing Up in Archives"
- MayaS on "Altering the_author_posts_link output"
- ericgallagher on "Show all posts by author - including custom posts types"
- vlad_paun on "Show all posts by author - including custom posts types"
- alchymyth on "Altering the_author_posts_link output"
- aaronkarp on "Altering the_author_posts_link output"
- aminabbasian on "Why Would the_author_posts_link link the Author URL?"
- aminabbasian on "Why Would the_author_posts_link link the Author URL?"
- Hax on "Show all posts by author - including custom posts types"