I’d like to welcome new users with a personal message using their first, last, and user names. Is there a list of s2member shortcodes that can do this? Thanks.
Is there a s2member short code to display a users first name?
The below statement basically does this, (Is user loggeed in? if yes then display)
Hi “current username”,
[s2If is_user_logged_in()]Hi [s2Get constant=“S2MEMBER_CURRENT_USER_DISPLAY_NAME” /],
You can then say whatever to them here and close with thank you. After your message add the s2If close.
[/s2If]
Ross
Ross is correct, that constant would give you his name for your customized message. You could also use S2MEMBER_CURRENT_USER_FIRST_NAME
.
You can learn more about these constants here: WP Admin > s2Member > API / Scripting > PHP/JS Constants
See also: https://s2member.com/kb-article/s2get-shortcode-documentation/
If you put the greeting in your Login Welcome Page, the s2If will not be needed because only logged in users can see it. WP Admin > s2Member > General Options > Login Welcome Page
See also: https://s2member.com/kb-article/customizing-your-login-welcome-page/