最近老牛準備用 WordPress3.9 做一個網站,註冊的會員可以投稿,所以必須用到調用作者信息的函數,把正確的調用方法貼出來方便以後再次使用。
獲取作者名稱函數示例如下:

<?php the_author();?>

可以調用的字段如下:
the_author 顯示文章的作者
the_author_description 顯示文章作者的描述 (作者個人資料中的描述)
the_author_login 顯示文章作者的登錄名
the_author_firstname 顯示文章作者的 firstname(名)
the_author_lastname 顯示文章作者的 lastname(姓)
the_author_nickname 顯示文章作者的暱稱
the_author_ID 顯示文章作者的 ID 號
the_author_email 顯示文章作者的電子郵箱
the_author_url 顯示文章作者的網站地址
list_authors (不推薦使用) 顯示 blog 所有作者和他們的相關信息。完整函數如下:
參數:
optioncount:是否顯示各作者已發表文章的篇數,可選值為:TRUE 和 FALSE(默認值)