Merge tag {current_post:PROPERTY}
Current post. A property of the post being viewed. Unlike {embed_post}, it also works on archive pages.
On the test entry, {current_post} gives http://fixture.gravitykit.test/?page_id=1883.
| Product | GravityView |
|---|---|
| Requires | GravityView 1.21.5 or later |
| Needs an entry | No |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| Post property | text | No | permalink | Any property of the post being viewed. The list shows common ones; others work too. |
Values for Post property
| Value | Description |
|---|---|
permalink | Permalink (default) |
ID | Post ID |
post_title | Title |
post_name | Slug |
post_author | Author ID |
post_date | Published date |
post_excerpt | Excerpt |
Other values are accepted too.
Examples
Output from the real plugin code, run on a test entry.
| Merge tag | Output |
|---|---|
{current_post} | http://fixture.gravitykit.test/?page_id=1883 |
{current_post:permalink} | http://fixture.gravitykit.test/?page_id=1883 |
{current_post:ID} | 1883 |
{current_post:post_title} | Contact us |
{current_post:post_name} | contact-us |
{current_post:post_author} | 2 |
{current_post:post_date} | 2026-01-14 12:00:00 |
{current_post:post_excerpt} | Send us a note and we will reply within a day. |