Single template merge tags
Single tags read the current post or custom post type item.
Core content
| Merge tag | Output |
|---|---|
{{post_id}} |
Current post ID |
{{title}} |
Post title |
{{content}} |
Full post content |
{{excerpt}} |
Post excerpt |
{{permalink}} |
Post URL |
{{date}} |
Publish date |
{{modified}} |
Last modified date |
{{author_name}} |
Author display name |
{{posts_nav}} |
Previous/next post navigation |
Useful attributes:
{{content fallback_message=%%No description is available.%%}}
{{excerpt limit="180"}}
Images and galleries
{{featured_image image_size="large"}}
{{featured_image_url image_size="large"}}
{{image_from_meta name="hero_image"}}
{{gallery meta_name="photo_gallery" style="masonry" image_size="large" lightbox_click="yes"}}
featured_image and image_from_meta return image HTML. featured_image_url returns the URL.
Custom fields
{{meta name="venue" only_content="true"}}
{{meta name="event_date" type="date" prepend=%%Date: %%}}
type accepts date, datetime or time. The wrapper form can also use prepend, append and icon.
Conditional content
{{if meta="venue" value="not_empty"}}
{{meta name="venue"}}
{{else}}
<p>{{translatable_string text=%%Venue to be confirmed%%}}</p>
{{/if}}
value accepts an exact field value, empty or not_empty.
Helpers
{{icon family="feather" name="calendar"}}
{{translatable_string text=%%Event details%%}}
For the full attribute reference and examples, see Single templates.