Notifications
Clear all

Shortcode not displaying correctly in email

5 Posts
4 Users
1 Likes
1,023 Views
LeslieCarson
Posts: 1
Topic starter
(@lesliecarson)
New Member
Joined: 4 years ago

In the settings for emails, I have the "New Reply at [entry_title] [blogname]" set as the subject; and that's exactly the subject that is coming across in the email.

subject is: New Reply at [entry_title] [blogname]

should be: New Reply at Garden City Gets Real! Blog Name

What do I need to do to fix this?

Topic Tags
4 Replies
Sofy
Posts: 4057
 Sofy
Admin
(@sofy)
Support Team
Joined: 5 years ago

Hi @lesliecarson,

Please let us know which email you mean. There are several email templates and each email templates can have different and specific shortcodes available only for itself.

Reply
fawp
Posts: 153
 fawp
(@fawp)
Estimable Member
Joined: 3 years ago
Posted by: @sofy

There are several email templates and each email templates can have different and specific shortcodes available only for itself.

Hi Sofy,

 

About this, for example, I see that in the "New User Registration Email for user" in the body you have available

 

  • [user_login] - Registered user login
  • [set_password_url] - Link to open password reset form

but not [blogname] so this one is a shortcode that apparently I cannot use in that specific template.

 

In fact, I can apparently use [blogname] in the email subject but not in the body for this template.

 

Is there any specific reason for this? Why not make these shortcodes widely available for all templates and instead restrict them in this manner?

Reply
2 Replies
Alvina
Moderator
(@alvina)
Joined: 3 years ago

Member
Posts: 1872

Hi @fawp,

In the next versions update, we are going to reconsider our email templates to make it more intuitive.

Why not make these shortcodes widely available for all templates and instead restrict them in this manner?

I'm sorry there is no way to do this, because of the not all template has a corresponding data.

For example, in the mentioning email template, we can't use the unsubscribe link, because of mentioning does not have the unsubscribe or subscribe link, and etc.

Reply
fawp
 fawp
(@fawp)
Joined: 3 years ago

Estimable Member
Posts: 153

Thanks @alvina

 

At the moment I was mostly concerned about the welcome email sent when a new user registers on the site.

 

For now I have found this WP filter that can help with the customization. So that should help

 

https://developer.wordpress.org/reference/hooks/wp_new_user_notification_email/

Reply