Format merge-tag attributes
Merge tags use double braces. Attributes follow the tag name:
{{meta name="event_date" type="date"}}
Supported attribute formats
POM accepts double quotes, single quotes, unquoted values and literal delimiters:
{{meta name="subtitle"}}
{{meta name='subtitle'}}
{{meta name=subtitle}}
{{translatable_string text=%%A label with spaces%%}}
Use %%...%% for text containing spaces, quotes, HTML or nested dynamic content. It keeps the boundary of the attribute value unambiguous:
{{content fallback_message=%%<p>No description is available.</p>%%}}
Nested translated labels
{{translatable_string}} can supply the value of another merge-tag attribute:
{{meta
name="event_date"
type="date"
prepend={{translatable_string text=%%Starts on: %%}}
}}
It can also be used inside a shortcode attribute:
[web_offcanvas_content title="{{translatable_string text=%%Filters%%}}"]
Translated strings are passed through the active POM translation integration where supported.
Boolean and enumerated values
Values such as true, yes, empty and not_empty are text tokens. Use the exact token expected by the relevant tag:
{{meta name="subtitle" only_content="true"}}
{{gallery meta_name="photos" lightbox_click="yes"}}
{{if meta="subtitle" value="not_empty"}}
...
{{/if}}
only_content="true" and lightbox_click="yes" are not interchangeable.
Safe HTML structure
Use dynamic URLs inside an attribute and dynamic HTML as an element's content:
<a href="{{permalink}}">{{title}}</a>
<div class="summary">{{excerpt limit="160"}}</div>
Do not copy a tag from one template type to another. Archive, feed and single templates each expose a different merge-tag set.
Verification
- Confirm every opening
{{has a matching}}. - Confirm attribute names match the relevant reference page.
- Confirm opening and closing conditional tags are balanced.
- Test labels containing apostrophes and quotation marks.
- Check the rendered HTML rather than expecting unused attributes to change the output.