Personalize Your Newsletters With Shortcodes

You can personalize your newsletters by including shortcodes which will show more information about your subscribers, about your content, specific dates, etc. See the full list of available shortcodes.

They work in two different places:
  1. In the Subject line of your newsletter
  2. In the Newsletter editor

In the Subject line

Simply add the shortcode of your choice in the Subject line of your newsletter:

In the Newsletter designer

To add a shortcode or a default text (where the information is missing), click on any text block inside the newsletter designer and use the following button:

You will see a full list of available shortcodes. Just click on the ones you want added to your text block.

First and last name shortcode

Useful for when you want to refer to your subscribers first or last name (assuming you collect this information in a subscription form):

[user:firstname | user:lastname | default:subscriber]

The text after the parameter "default" will be used when the first name or last name is not found on the subscriber's records. By using word "subscriber" it will display "Hey, subscriber!"

Getting creative with the [user] shortcode

If you want to display just the first name, use this:

Howdy [user:firstname | default:subscriber], how are you today?

If your subscriber full name is John Doe, and you send him the newsletter, he will see the message: Howdy John, how are you today?

If you want to use his full name (which is tricky because you have to be creative for email-only subscribers):

Hello [user:firstname | default:Comrade] [user:lastname | default:of our ship]!

This would display one of these 3 combinations if the recipient is called John Doe:

  1. Hello John Doe!
  2. Hello Comrade Doe!
  3. Hello Comrade of our ship!

Full list of available shortcodes

User:
  • First Name: [user:firstname | default:subscriber]
  • Last Name: [user:lastname | default:subscriber]
  • Email Address: [user:email]
  • WordPress user display name: [user:displayname | default:subscriber]
Newsletter:
  • Newsletter Subject: [newsletter:subject]
  • Show number of posts or pages: [newsletter:total]
  • Show Most Recente Post Title: [newsletter:post_title]
  • Display the Issue Number: [newsletter:number]
  • Display a list of past newsletters on a page: [mailpoet_archive]
Date:
  • Current day of the month number: [date:d]
  • Current day of the month in ordinal form, ie. 2nd, 3rd, etc : [date:dordinal]
  • Full name of current day: [date:dtext]
  • Current month number: [date:m]
  • Full name of current month: [date:mtext]
  • Year: [date:y]
Newsletter designer (only):
  • Unsubscribe: [link:subscription_unsubscribe_url]
  • Manage your subscription: [link:subscription_manage_url]
  • View in browser link: [link:newsletter_view_in_browser_url]

Create your own custom shortcode

Please read this article for more information on adding your own shortcodes.