# What are the available template tags ?

These are the shortcodes (template tags) you can place inside a list **Template**. You use structural tags like `[posts]` and `[nav]` once to lay out the list; the remaining tags output data for each item in the loop. The sections below group the tags by what they apply to.

### List &amp; template tags

| Tag | Details |
|---|---|
| `[posts]` | **return** the posts template |
| `[terms]` | **return** the terms template |
| `[users]` | **return** the users template |
| `[groups]` | **return** the groups template |
| `[nav]` | **return** pagination for the list **Attributes**:  **type** = (text) allowed values – plain, list, nav  **ajax** = (0\|1) use pagination with ajax  **prev\_text** = pagination next button text  **next\_text** = pagination prev button text |
| `[title]` | **Output**: title template |
| `[meta]` | **Output**: meta template |
| `[publish]` | **Output**: publish time template |
| `[date]` | **Output**: publish time template |
| `[modified]` | **Output**: modified time template |
| `[author]` | **Output**: author template |
| `[excerpt]` | **Output**: excerpt template |
| `[content]` | **Output**: content template |
| `[more]` | **Output**: more link template **Attributes:**  **text** = (string), text to be displayed |

### Post tags

| Tag | Details |
|---|---|
| `[id]` | **Output**: post id |
| `[ID]` | **Output**: post id |
| `[post_id]` | **Output**: post id |
| `[post_type]` | **Output**: post type |
| `[post_type_label]` | **Output**: post type label |
| `[post_status]` | **Output**: post status |
| `[post_status_label]` | **Output**: post status label |
| `[post_number]` | **Output**: post item number, starting from 1 |
| `[post_permalink]` | **Output**: post url/link |
| `[post_class]` | **Output**: post html classes |
| `[post_title]` | **Output**: post title **Attributes:**  **wordlimit** = (number), limit number of words to display  **charlimit** = (number), limit number of characters to display |
| `[post_name]` | **Output**: post name |
| `[post_comment_url]` | **Output**: post comment form link/url |
| `[post_comment_count]` | **Output**: (numeric) amount of approved comments |
| `[post_the_date]` | **Output**: unique post date, ignored on current item if previous post date and curent post date is same (date formatted) **Attributes:**  **format** = php datetime format  **before** = before date  **after** = after date |
| `[post_date]` | **Output**: post date (date formatted) **Attributes:**  **format** = php datetime format |
| `[post_time]` | **Output**: post date (time formatted) **Attributes:**  **format** = php datetime format |
| `[post_modified_date]` | **Output**: post modified date (date formatted) **Attributes:**  **format** = php datetime format |
| `[post_modified_time]` | **Output**: post modified date (time formatted) **Attributes:**  **format** = php datetime format |
| `[post_author_meta]` | **Output**: post author meta value **Attributes:**  **name** = ex: display\_name, bio, user\_email etc |
| `[post_author_name]` | **Output**: post author name |
| `[post_author_url]` | **Output**: post author name url |
| `[post_author_email]` | **Output**: post author email address |
| `[post_author_avatar]` | **Output**: post author avatar **attributes:**  **size** = (number), avatar image size |
| `[post_excerpt]` | **Output**: post excerpt/short description **Attributes:**  **wordlimit** = (number), limit number of words to display |
| `[post_content]` | **Output**: post content |
| `[post_thumbnail]` | **Output**: (text\|number) based on the rerurn attribute &amp; only if the post has a thumbnail assigned **Attributes:**  **return** = (id\|src\|html),  —-“src” – will return src of the image,  —-“id” – will return id of the image,  —-by default it will return image html  **class** = (string), class name for the image (&lt;img /&gt;) tag  **size** = (string), thumbnail size  **width** = (number), thumbnail width  **height** = (number), thumbnail height  **placeholder** = (text), default placeholder text if post thumbnail no found |
| `[post_image]` | **Output**: **first** or **last** image source (src=””) from post content **Attributes:**  **position** = (first\|last)  **return** = (text\|number),  —-“src” – will return src of the image,  —-by default it will return image html  **class** = (string), class name for the image (&lt;img /&gt;) tag  **width** = (number), set image width attr (image scaling, not resizing)  **height** = (number), set image height attr (image scaling, not resizing)  **use\_fallback** = (true\|false), set 1 to use `[post_thumbnail]` shortcode as fallback while post content dont have any images. |
| `[post_meta]` | **Output**: post meta value. if return value is an array, it will be migrated to string by using explode function **Attributes:**  **key** = (text\|number), meta key name  **sub\_key** = (text\|number), if meta value is array\|object, display a specific value by it’s key  **multiple** = (0\|1), display meta value at multiple occurence  **sep** = (text), separate array meta value into string |
| `[post_meta_date]` | **Output**: post meta value. if return value is an array, it will be migrated to string by using explode function **Attributes:**  **key** = (text\|number), meta key name |
| `[post_terms]` | **Output**: post type terms. if return value is an array, it will be migrated to string by using explode function **Attributes:**  **tax** = (string), taxonomy name  **sep** = (string), separate array meta value into string  **return** = (name\|slug), return plain name or slug |
| `[attachment_thumbnail]` | **Output**: if the post type is attachment, the attached file thumb is displayed. **Attributes:**  **id** = (string), attachment id  **meta\_key** = (string), retrieve attachment id from meta value  **size** = (string), image size  **class** = (string), class name for the image (&lt;img /&gt;) tag  **width** = (number), image width  **height** = (number), image height  **return** = (text\|number),  —-“src” – will return src of the attachment,  —-“id” – will return id of the attachment,  —-by default it will return image html |
| `[attachment_url]` | **Output**: if the post is an attachment, the attached image source is returned |
| `[parent_permalink]` | **Output**: if the post type is hierarchical, it’s parent post permalink is returned **Attributes:**  **self** = (int), if no parent item exist, return the self permalink |

### Group tags

| Tag | Details |
|---|---|
| `[group_id]` | **Output**: group name / title |
| `[group_title]` | **Output**: group name / title |
| `[group_url]` | **Output**: group page link |

### Term tags

| Tag | Details |
|---|---|
| `[term_id]` | **Output**: term id |
| `[term_name]` | **Output**: term name |
| `[term_slug]` | **Output**: term slug |
| `[term_link]` | **Output**: term page link |
| `[term_count]` | **Output**: term posts count |
| `[term_content]` | **Output**: term description |

### User tags

| Tag | Details |
|---|---|
| `[user_id]` | **Output**: user id |
| `[user_name]` | **Output**: user name |
| `[user_email]` | **Output**: user email |
| `[user_link]` | **Output**: user post page link |
| `[user_count]` | **Output**: user posts count |
| `[user_bio]` | **Output**: user description / biography |
| `[user_meta]` | **Output**: user meta value. if return value is an array, it will be migrated to string by using explode function **Attributes:**  **key** = (text\|number), meta key name  **multiple** = (0\|1), display meta value at multiple occurence  **sep** = (text), separate array meta value into string |
| `[user_avatar]` | **Output**: user avatar **Attributes:**  **size** = (number), avatar image size, ex: 32, 64, 128 |

Source: https://w4dev.com/docs/w4-post-list/what-are-the-available-template-tags/
