skip to Main Content

mywp_user

Mywp_user

Description

mywp_user shortcode can be get the user data.

 

Usage

Default user data is current user and “field” attribute is must have a value.

[mywp_user field="****"]

 

Attributes

field=”id

Get the user id.

[mywp_user field="id"]

Result

1

 

field=”name

Get the user display name.

[mywp_user field="name"]

Result

Admin

 

field=”fname

Get the user first name.

[mywp_user field="fname"]

Result

Firstname

 

field=”lname

Get the user last name.

[mywp_user field="lname"]

Result

Lastname

 

field=”displayname

Get the user display name.

[mywp_user field="displayname"]

Result

Displayname

 

field=”user_login

Get the user login name.

[mywp_user field="user_login"]

Result

admin

 

field=”user_role

Get the user role name.

[mywp_user field="user_role"]

Result

administrator

 

field=”avatar

Get the avatar html tag. And this code can be change the avatar size with size=”***” (default size: 96).

[mywp_user field="avatar" size="100"]

Result

<img class="avatar avatar-100 photo" src="###avatar_url###" srcset="###avatar_url###" alt="" width="100" height="100" />

 

user_id=”***

Get the specific user information.

[mywp_user user_id="1" field="id"]

Result

1
This Post Has 0 Comments

Leave a Reply

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

Back To Top