User Fields
This article covers built-in WordPress dynamic data FIELDS that are automatically available in Builderius without custom queries. All fields shown work immediately when you add them to elements.
Understand the Tables
Table Columns
Dynamic Data Tag - The tag automatically added when you select from the Dynamic Data dropdown, using square bracket syntax: [[wp.field_name]]
Description - What content this tag will display on your website
Type - What kind of data this field returns
Data Types Explained
String - Text content like "John Smith" or "[email protected]"
Int - Whole numbers like user ID 142
Array - Multiple items like user roles ["editor", "author"]
How to Use This Data
Click the Dynamic Data Icon available on each Builderius element. Search for what you want and add it.
User template availability - All data shown works when users are logged in or on user profile templates
User Scope
Data about the currently logged-in user or user being viewed. Available when viewing user profile templates or when users are authenticated - includes user information, roles, capabilities, and custom user fields.
Built-in Data Tags (Direct Use)
These fields work immediately in user template elements - no setup required.
Current User Information
| Dynamic Data Tag | Description | Type |
|---|---|---|
[[wp.current_user.ID]] | Current user ID | Int |
[[wp.current_user.user_login]] | Current user username | String |
[[wp.current_user.user_email]] | Current user email | String |
[[wp.current_user.display_name]] | Current user display name | String |
[[wp.current_user.first_name]] | Current user first name | String |
[[wp.current_user.last_name]] | Current user last name | String |
[[wp.current_user.user_url]] | Current user website URL | String |
[[wp.current_user.description]] | Current user bio/description | String |
[[wp.current_user.avatar_url]] | Current user avatar image URL | String |
[[wp.current_user.roles]] | Current user roles | Array |
User Meta & Custom Fields
| Dynamic Data Tag | Description | Type |
|---|---|---|
[[wp.current_user.meta_field__field_name]] | User meta field (replace [field_name] with actual meta key) | Mixed |
ACF User Fields (Site-Specific)
| Dynamic Data Tag | Description | Type |
|---|---|---|
[[wp.current_user.acf_field__[field_name]]] | ACF user field (replace [field_name] with your ACF field name) | Mixed |
MetaBox User Fields (Site-Specific)
| Dynamic Data Tag | Description | Type |
|---|---|---|
[[wp.current_user.mb_field__[field_name]]] | MetaBox user field (replace [field_name] with your MetaBox field name) | Mixed |
Usage Examples
- User Profile Card
- Dashboard Header
- Account Settings
- Conditional Content
User Profile Display:
<div class="user-profile">
<header class="profile-header">
<img src="[[wp.current_user.avatar_url]]" alt="[[wp.current_user.display_name]]">
<div class="profile-info">
<h1>[[wp.current_user.display_name]]</h1>
<p>@[[wp.current_user.user_login]]</p>
<p>[[wp.current_user.first_name]] [[wp.current_user.last_name]]</p>
</div>
</header>
<div class="profile-details">
<p>[[wp.current_user.description]]</p>
<p>Website: <a href="[[wp.current_user.user_url]]">[[wp.current_user.user_url]]</a></p>
<p>Email: [[wp.current_user.user_email]]</p>
<!-- Custom fields -->
<p>Location: [[wp.current_user.acf_field__location]]</p>
<p>Job Title: [[wp.current_user.acf_field__job_title]]</p>
</div>
</div>
User Dashboard Welcome:
<header class="dashboard-header">
<div class="welcome-section">
<img src="[[wp.current_user.avatar_url]]" alt="[[wp.current_user.display_name]]">
<div>
<h1>Welcome back, [[wp.current_user.first_name]]!</h1>
<p>[[wp.current_user.display_name]] • [[wp.current_user.user_login]]</p>
</div>
</div>
<div class="user-stats">
<span>User ID: [[wp.current_user.ID]]</span>
<!-- Use Collection element for roles: [[wp.current_user.roles]] -->
<!-- Inside Collection template: -->
<span class="role-badge">{{.}}</span>
</div>
</header>
Account Settings Form:
<form class="account-settings">
<h2>Account Settings for [[wp.current_user.display_name]]</h2>
<div class="form-group">
<label>Display Name:</label>
<input type="text" value="[[wp.current_user.display_name]]">
</div>
<div class="form-group">
<label>First Name:</label>
<input type="text" value="[[wp.current_user.first_name]]">
</div>
<div class="form-group">
<label>Last Name:</label>
<input type="text" value="[[wp.current_user.last_name]]">
</div>
<div class="form-group">
<label>Bio:</label>
<textarea>[[wp.current_user.description]]</textarea>
</div>
<div class="form-group">
<label>Website:</label>
<input type="url" value="[[wp.current_user.user_url]]">
</div>
<!-- Custom ACF fields -->
<div class="form-group">
<label>Phone:</label>
<input type="tel" value="[[wp.current_user.acf_field__phone]]">
</div>
<button type="submit">Update Profile</button>
</form>
Role-Based Content:
<div class="user-dashboard">
<h1>Welcome, [[wp.current_user.display_name]]</h1>
<!-- User roles -->
<div class="user-roles">
<h3>Your Roles:</h3>
<!-- Use Collection element with data source: [[wp.current_user.roles]] -->
<!-- Inside Collection template: -->
<span class="role role-{{.}}">{{.}}</span>
</div>
<!-- User contact info -->
<div class="contact-info">
<h3>Contact Information</h3>
<p>Email: <a href="mailto:[[wp.current_user.user_email]]">[[wp.current_user.user_email]]</a></p>
<p>User ID: #[[wp.current_user.ID]]</p>
<p>Username: [[wp.current_user.user_login]]</p>
</div>
<!-- Custom profile fields -->
<div class="custom-fields">
<h3>Profile Details</h3>
<p>Company: [[wp.current_user.acf_field__company]]</p>
<p>Department: [[wp.current_user.mb_field__department]]</p>
<p>Employee ID: [[wp.current_user.meta_field__employee_id]]</p>
</div>
</div>