Placeholders for email templates

This documentation provides a list of available placeholders you can use in the email templates.

{display_name}
{first_name}
{last_name}
{gender}
{username}
{email}
{login_url}
{login_referrer}
{site_name}
{site_url}
{account_activation_link}
{password_reset_link}
{admin_email}
{user_profile_link}
{user_account_link}
{submitted_registration}
{user_avatar_url}
{usermeta:here_any_usermeta_key}' (e.g. {usermeta:store_location} where store_location is meta key)

It is also possible to create custom placeholders using hooks:
  • um_template_tags_patterns_hook
  • um_template_tags_replaces_hook
Example:
/**
 * Add short tag {user_id}
 */
add_filter( 'um_template_tags_patterns_hook', 'my_template_tags_patterns', 10, 1 );
add_filter( 'um_template_tags_replaces_hook', 'my_template_tags_replaces', 10, 1 );

function my_template_tags_patterns( $search ) {
	$search[] = '{user_id}';
	return $search;
}
function my_template_tags_replaces( $replace ) {
	$replace[] = um_user( 'ID' );
	return $replace;
}

It is also possible to use email placeholders in the page/post content.

Just wrap the email placeholder in the shortcode [um_show_content]. This shortcode can convert email placeholders in pages.

Example:

[um_show_content roles="contributor,subscriber"] {display_name} [/um_show_content]