the_author_link() - WordPress 函数参考中文文档

返回介绍

the_author_link()

发布于 2017-09-11 字数1564 浏览 977 评论 0

the_author_link()

Display either author’s link or author’s name.


描述

If the author has a home page set, echo an HTML link, otherwise just echo the author’s name.


源代码

File: wp-includes/author-template.php

function the_author_link() {
	echo get_the_author_link();
}

更新日志

Version 描述
2.1.0 Introduced.

相关函数

Uses

  • wp-includes/author-template.php:
    get_the_author_link()

User Contributed Notes

  1. Skip to note content

    You must log in to vote on the helpfulness of this noteVote results for this note: 0You must log in to vote on the helpfulness of this note

    Contributed by Codex

    Example
    Displays the author’s Website URL as a link and the text for the link is the author’s Profile Display name publicly as field. In this example, the author’s Display Name is James Smith.

    
    <p>Written by: 
    <?php the_author_link(); ?></p>
    

    Which displays as:

    Written by: James Smith

上一篇:the_author_lastname()

下一篇:the_author_login()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!