Overview
This documentation provides a list of available merge tags you can use in the email templates.
Common merge tags
| Merge Tag | Description |
| {display_name} | Display name of the user. |
| {first_name} | Displays the first name of the user. |
| {last_name} | Displays the last name of the user. |
| {username} | Displays the login username of the user. |
| {email} | Email of the user. |
| {admin_email} | Admin’s email. |
| {site_name} | Website name set from general settings. |
| {site_url} | URL of this site. |
| {register_date} | Registration date of user. |
| {user_activation_link} | This generates the email activation link. Users can activate account by click this URL. |
| {user_account_link} | User’s account page link. |
| {login_url} | Default login page link. |
Template-Specific Merge Tags
| Merge Tag | Description |
| {password_reset_link} | This generates the link for the password reset page, when clicked, users will be redirected to the password reset page. |
| {password} | Displays the text Your set password (as translated) |
Custom Merge Tags
Use this pair of hooks to add merge tags and their values:
amem/template/merge_tagsamem/template/merge_tags/replace
/**
* Add merge tag {user_id}
*/
add_filter( 'amem/template/merge_tags', 'my_amem_merge_tags', 10, 1 );
add_filter( 'amem/template/merge_tags/replace', 'my_amem_merge_tags_replace', 10, 1 );
function my_amem_merge_tags( $tags ) {
$tags[] = '{user_id}';
return $tags;
}
function my_amem_merge_tags_replace( $replace ) {
$replace[] = amem_user( 'ID' );
return $replace;
}