WordPress author metadata tag: the_ author_ meta

WordPress template tags the_ author_ Meta outputs the metadata of the author of the article. If it is used outside the main loop of the loop, the author ID must be passed.

the_author_meta( string $field = '', integer $user_id = false )

Function parameters

$field

String value, null by default

The optional values are as follows:

  • user_ Login: login account
  • user_ Pass: encrypted password
  • user_ Nice name
  • user_ Email: email
  • user_ URL: user home page
  • user_ Registered: registration time
  • user_ activation_ Key: used to verify whether the password link is still valid
  • user_ Status: user status
  • display_ Name: the value of “public display as” in the user profile
  • Nickname: nickname
  • first_ Name: first name
  • last_ Name: last name
  • Description: “personal description” in user profile
  • Jabber: jabber account
  • Aim: Aim account number
  • Yim: Yim account number
  • user_ Level: user level
  • user_ Firstname: first name
  • user_ LastName: last name
  • user_ Description: “personal description” in user profile
  • rich_ Editing: is a visual editor used
  • comment_ Shortcuts: keyboard shortcuts
  • admin_ Color: management interface color scheme
  • plugins_ per_ page:
  • plugins_ last_ view:
  • ID: user ID

$userid

Integer type, default value: false

If you use the_ author_ Meta() function, the user ID is the current author’s ID by default. If it is used outside the main loop, the user ID must be specified

Examples of function usage

<p><?php the_author_meta('display_name'); ?>的注册时间:<?php the_author_meta('user_registered'); ?></p>

Extended reading

The function is located in: WP includes / author- template.php

Related tags:

  • the_ author()
  • get_ the_ author()
  • get_ the_ author_ id()
  • the_ author_ link()
  • get_ the_ author_ link()
  • get_ the_ author_ meta()
  • the_ author_ posts()
  • get_ the_ author_ posts()
  • the_ author_ posts_ link()
  • get_ author_ posts_ url()
  • get_ the_ modified_ author()
  • the_ modified_ author()
  • wp_ dropdown_ users()
  • wp_ list_ authors()
Related Article
WordPress comment date tag: comment_date

WordPress template tags comment_ Date is used to output the date of a comment, usually in a custom comment template. Read more

WordPress comment summary tag: comment_excerpt

WordPress template tags comment_ Excerpt is used to output the summary of comments. The default output is 20 characters. It Read more

WordPress comment time tag: comment_time

WordPress template tags comment_ Time is used to output the publishing time of the current comment, which is the same Read more

WordPress RSS format comment author name tag: comment_author_rss

WordPress template tags comment_ author_ RSS is used to output the comment author name in RSS format, which has no Read more

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image