web_user_details Shortcode
The web_user_details shortcode renders a message for the current signed-in visitor, with a separate optional guest message. It does not select another account or use the page author.
The attributes below match the current Page Builder controls and public output. Use raw syntax only for reviewed content that cannot be maintained through the visual controls.
Usage
[web_user_details content_not_logged_in="Please sign in to see your account details." el_class="p-125"]Hello {user_name} {user_last_name}. Your email is {user_email}.[/web_user_details]
Attributes
| Attribute | Default | Accepted values | Purpose |
|---|---|---|---|
content_not_logged_in |
Empty | Safe basic HTML | Message for signed-out visitors; empty means no output. |
el_id |
Empty | Unique HTML ID | Anchor on the populated component's container. |
el_class |
Empty | Space-separated class names | Existing theme helpers on the container; no generated CSS. |
The signed-in message is enclosed content, not a content attribute. It supports {user_avatar}, {user_name} (first name), {user_last_name}, {user_email} and {user_login}. Text fields also work in link destinations, such as mailto:{user_email}. Avatars work only in message text and follow WordPress's avatar settings.
Messages permit safe post HTML, including text, images, emphasis, lists and links. The enclosed signed-in message also supports nested theme shortcodes and preserves their generated images, icons and controls. Profile fields are escaped before nested shortcodes run, so a profile value cannot execute a shortcode. Unsafe links and executable authored markup are rejected. Missing profile values remain empty.
The component uses web-user-details and existing helpers, with no dedicated frontend stylesheet or script. It does not implement a separate device_visibility attribute.
Privacy and caching
The visitor's details are resolved at render time rather than saved into the page. WordPress and POM Cache bypass signed-in requests; any separate proxy or CDN must also exclude authenticated WordPress cookies and honor private/no-store responses. Do not serve personalized HTML through a shared public cache.
The Gutenberg User Details block uses the same renderer and previews fictitious details in the editor. See Personalize a message with User Details.
Verification
Compare the page signed in and signed out. Check empty messages, missing profile fields, avatar settings, links and narrow layouts. A profile change should appear on a fresh authenticated request without resaving the page. Confirm that an anonymous visitor never receives another visitor's personalized response.