5ucms论坛

标题: wordpress 获取文章作者相关信息标签 [打印本页]

作者: admin    时间: 2021-6-3 08:45
标题: wordpress 获取文章作者相关信息标签
  1. //显示文章的作者
  2. <?php the_author(); ?>

  3. //显示文章作者的描述(作者个人资料中的描述)
  4. <?php the_author_description(); ?>

  5. //显示文章作者的登录名
  6. <?php the_author_login(); ?>

  7. //显示文章作者的firstname(名)
  8. <?php the_author_firstname(); ?>

  9. //显示文章作者的lastname(姓)
  10. <?php the_author_lastname(); ?>

  11. //显示文章作者的昵称
  12. <?php the_author_nickname(); ?>

  13. //显示文章作者的ID号
  14. <?php the_author_ID(); ?>

  15. //显示文章作者的电子邮箱
  16. <?php the_author_email(); ?>

  17. //显示文章作者的网站地址
  18. <?php the_author_url(); ?>

  19. //显示一个以文章作者名为链接名,链接地址为文章作者的网址的链接。
  20. <?php the_author_link (); ?>

  21. // 显示文章作者已发表文章的篇数
  22. <?php the_author_posts(); ?>

  23. //显示一个链接到文章作者已发表文章列表的链接
  24. <?php the_author_posts_link(); ?>

  25. //显示blog作者列表
  26. <?php wp_list_authors(); ?>
复制代码


optioncount:是否显示各个作者发表文章数,可选值:true 和 false(默认值)
exclude_admin:是否不显示”admin”用户,可选值:true(默认值) 和 false
show_fullname:是否显示各个作者的全名,如果不显示,将显示昵称。可选值:true 和 false(默认值)
hide_empty:是否不显示发表文章数为0的作者,可选值:true(默认值) 和 false
feed:链接到各个作者发表文章的RSS供稿种子链接名,默认为空,不显示RSS供稿种子
feed_image:供稿种子的图片地址,如果提供此项,则覆盖上面的feed,默认为空。





欢迎光临 5ucms论坛 (http://bbs.5ucms.com/) Powered by Discuz! X3.2