Wordpress functions for obtaining author information the_author_meta ()

Source: Internet
Author: User
In this way, we can get the relevant information of the Author. if we want to add the author's introduction to our website, we can use this method, such as the author information on linzl.com.

Note: If you want to display user information but do not want to display it (for example, in the php method), use the get_the_author_meta () method.

Usage:

 



Parameter description:


$ Field (string) field name of the user information to be displayed (which can be found in the database ). Commonly used:


User_login (user login name)

User_pass (user logon password)

User_nicename (user nickname)

User_email (user email address)

User_url (user website address)

User_registered (user registration time)

User_status (user status)

Display_name (name displayed by the author)

Nickname (nickname of the author)

First_name (author name)

Last_name (author's surname)

Description)

User_level (user level)

User_firstname (username)

User_lastname (user name)

User_description (user description)

ID (user ID value)

Example:

 // Obtain the author's email address
 // Obtain the nickname of the Author



In this way, we can get the relevant information of the Author. if we want to add the author's introduction to our website, we can use this method, such as the author information on linzl.com.


It is important to note whether it is in the article loop. if not, you need to add the author's ID value. You can find it in the wp_users table of the database.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.