附加一个过滤器,当你在单条线上时,它只输出不同的链接。php:
function wpse25725_author_posts( $link )
{
// abort if not on single.php
if ( ! is_single() )
return;
// modify this as you like - so far exactly the same as in the original core function
// if you simply want to add something to the existing link, use ".=" instead of "=" for $link
$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()
);
return $link;
}
add_filter( \'the_author_posts_link\', \'wpse25725_author_posts\' );