Skip to main content
User - Dynamic Shortcodes

Discover the User Dynamic Shortcode: a versatile tool for retrieving user data in WordPress.

Updated over a week ago

This particular shortcode specializes in fetching and displaying user-related information based on specified parameters.


  • field represents the user metadata field.

Key Arguments

  • id Specifies the user ID to fetch data for. Requires Power Shortcodes privileges.

    {user:field @ID=3}

  • all When set, returns all values of the specified metadata field.

    {user:field @all}


  1. Email


    Retrieves the email of the current user.

  2. User ID


    Retrieves the email of the current user

  3. Display Name


    Retrieves the name of the current user.

  4. Registration Date

    {date:{user:registered} @format='d-m-Y H:i'}

    Retrieves the registration date of the current user.
    In this case {user:registered} is used inside the date shortcode to format it.

  5. Specifying User ID


    Fetches the login name of the user with ID 10.

  6. User Roles

    @sep=', '

    Returns all roles assigned to the current user. {user:roles} returns an array so we cycled the terms with the shortcode {for}.

Special Privileges

Some actions and information retrieval, such as accessing certain user metadata (e.g., email, login) or specifying a user ID, require the use of Power Shortcodes.
These have elevated privileges to ensure sensitive data is securely handled.

Did this answer your question?