Skip to content

Placeholders

A placeholder is a word between two percent signs. When sending, it is replaced per recipient with the matching value.

Dear %abo_title% %abo_name%,

becomes

Dear Ms Reinhardt,

Placeholders work in the subject, in the HTML version, in the text version and in a template of your own — the same everywhere. Upper and lower case do not matter for the subscriber and newsletter placeholders; for the date placeholders they do, where %m% and %M% are two different things.

The editor has an Insert placeholder button. It opens a list of everything this installation knows — including what modules contribute.


About the subscriber

Placeholder Becomes
%abo_title% Salutation, i.e. „Mr" or „Ms" — the value stored on the subscriber
%abo_vorname% First name
%abo_name% Last name
%abo_email% E-mail address
%abo_strasse% Street and house number
%abo_plz% Post code
%abo_ort% City

Empty fields stay empty

„Dear %abo_vorname% %abo_name%," becomes „Dear ," for a subscriber who only left their address. If you want to use names in the salutation, make the fields required under Form configuration — or write a salutation that works without a name.

That does not help retroactively for existing addresses. Check in the subscriber list how many actually have a name before you rely on it.

Unsubscribing and the subscription form

Placeholder Becomes
%deregisterurl% This recipient's personal unsubscribe address
%deregisterlink% The same link, ready as an <a> with the text „Unsubscribe from newsletter"
%deregisterformurl% The address of your subscription page
%deregisterformlink% The same link, ready as an <a> with the text „Newsletter form"

The first two unsubscribe with one click, without the recipient having to type their address. They are already in every supplied template — you do not have to place them yourself.

Without a subscriber, %deregisterurl% points at the form

In the browser view and in the archive there is no recipient. The personal fields are left empty there, and the unsubscribe link points at your subscription page instead of at a personal link. Otherwise a public page would carry a valid unsubscribe link belonging to someone else.

About the website

Placeholder Becomes
%privacyurl% The address of your privacy policy
%privacylink% The same link, ready as an <a> with the text „Privacy policy"

Both come from Settings → Privacy in the WordPress menu. If no published page is set there, they stay empty — a link to nothing would be worse than none at all.

About the newsletter

Placeholder Becomes
%nl_name% The name of the newsletter. It is in the subject line out of the box
%nl_onlineurl% Address of the browser view
%nl_onlinelink% Ready-made link, text „View newsletter in your browser"
%nl_onlineurl_text% Address of the text version in the browser
%nl_onlinelink_text% Ready-made link to the text version

The old names still work

%nl_previewurl%, %nl_previewlink%, %nl_previewurl_text% and %nl_previewlink_text% deliver the same thing. They are simply no longer offered for insertion: the endpoint is not a preview but the view of the sent newsletter, and a name that says something other than what it does does not belong in a selection list.

If you have a layout of your own, you need to change nothing.

Date and time

The placeholders follow strftime. They show the moment of sending in your website's time zone.

%d% Day, two digits %A% Weekday, spelled out
%e% Day, no leading zero %a% Weekday, abbreviated
%m% Month, two digits %B% Month, spelled out
%Y% Year, four digits %b% · %h% Month, abbreviated
%y% Year, two digits %j% Day of the year
%H% Hour, 24-hour clock %V% Calendar week
%I% Hour, 12-hour clock %p% AM / PM
%M% Minute %S% Second
%x% Date, as the locale writes it %X% Time, as the locale writes it
%T% HH:MM:SS %R% HH:MM
%Z% Time zone abbreviation %C% Century

The default for the name of a new newsletter uses them: Newsletter %b% %Y% gives „Newsletter Sep 2026".

Case matters here

%m% is the month, %M% the minute. %y% is two digits, %Y% four. This is the only group where it makes a difference.


From modules

Subscriber fields

Only in the Pro and Enterprise editions

Every custom field you create under Subscriber fields gets a placeholder %uf_<number>%. The number is in the field list; the editor's selection shows the name you gave it.

Placeholder rule

The Placeholder rule module allows placeholders of your own whose value depends on a condition — „if the post code starts with 9, then this text, otherwise that one". The name is yours to choose.

Your own code

If you want to set a placeholder of your own from a snippet:

$GLOBALS['wpng_arReplace']['/%unser_slogan%/i'] = 'From the spring, not from the tap.';

The key is a regular expression, the value the replacement text. Set it before the send runs — on init, for instance.


When a placeholder is left standing

The plugin checks this for you. When you open a newsletter that has not been sent, on a test send and when scheduling, the replacement is run once as a trial; whatever is still standing as %name% afterwards is reported:

This newsletter contains placeholders that nobody resolves: %abo_vname%. They will appear in the recipient's text exactly as they stand there.

Two causes are possible:

  1. A typo. It is %abo_vorname%, not %abo_vname%.
  2. The module that brings the placeholder along is not running. Often after a switch to the free package, or when somebody has switched a module off.

The message disappears by itself once the cause is fixed.

What the check does not report

Percent signs that are not placeholders are left alone: „100 % cotton", „50 % off" and the percent encoding in addresses (%C3%A4 for „ä"). Between the percent signs there must be letters, digits or underscores, and two hex digits do not count.

On an installation without a single subscriber it does not check at all — there, %abo_vorname% could not be told apart from an orphaned placeholder.