# Shortcodes

#### \[post\_grid]

Generate post grid content similar to the '\[StreamTube] Post List" widget.

Parameters:

All parameters can be combined. For instance, you can display 10 videos and blog posts with post statuses set to both "publish" and "private"

```
[post_grid post_type="video, post" post_status="publish, private" posts_per_page="10"]
```

**post\_type:** accepts a string with post type(s) separated by commas, for example:

```
[post_grid post_type="video"]
[post_grid post_type="post"]
[post_grid post_type="video, post, custom_post_type_slug"]
```

**post\_status:** accepts a string with post status(es) separated by commas, for example:

```
[post_grid post_status="publish"]
[post_grid post_status="publish, private"]
[post_grid post_status="publish, pending, private"]
```

**author\_\_in**: accepts a string with author ID(s) separated by commas, for example:

```
[post_grid author__in="1"]
[post_grid author__in="1,2,3"]
```

**author\_\_not\_in**: accepts a string with author ID(s) separated by commas, for example:

```
[post_grid author__in="1"]
[post_grid author__in="1,2,3"]
```

**role\_\_in**: accepts a string with roles ID(s) separated by commas, for example:

```
[post_grid role__in="administrator"]
[post_grid role__in="administrator, editor, author"]
```

**role\_\_not\_in**: accepts a string with roles ID(s) separated by commas, for example:

```
[post_grid role__in="administrator"]
[post_grid role__in="administrator, editor, author"]
```

**post\_\_in**: accepts a string with post ID(s) separated by commas, for example:

```
[post_grid post__in="1"]
[post_grid post__in="1,2,3,4"]
```

**post\_\_not\_in**: accepts a string with post ID(s) separated by commas, for example:

```
[post_grid post__not_in="1"]
[post_grid post__not_in="1,2,3,4"]
```

**posts\_per\_page**: limits the number of displayed posts, for example:

```
[post_grid posts_per_page="12"]
```

**col, col\_sm, col\_md, col\_lg, col\_xl, col\_xxl**: number of displayed columns, for example:

```
[post_grid col="1" col_sm="2" col_md="2" col_lg="4" col_xl="4" col_xxl="6"]
```

**tax\_query\_{taxonomy}**: accepts a string with term slug(s) separated by commas, for example:

```
// Displays posts from "Music" term of video category taxonomy
[post_grid tax_query_categories="music"]
// Displays posts from "Music" and "Sports" terms of video category taxonomy
[post_grid tax_query_categories="music,sports"]
```

```
// Displays posts from "tag1", "tag1" and "tag3" terms of video tag taxonomy
[post_grid tax_query_video_tag="tag1,tag2,tag3"]
```

```
// Displays posts from "category_slug1", "category_slug2" and "category_slug3" terms of blog category taxonomy
[post_grid tax_query_category="category_slug1,category_slug2,category_slug3"]
```

```
// Displays posts from "tag1", "tag1" and "tag3" terms of blog tag taxonomy
[post_grid tax_query_video_tag="tag1,tag2,tag3"]
```

**show\_post\_date**: Specify whether to display the post date, for example:

```
[post_grid show_post_date=""]
[post_grid show_post_date="diff"]
[post_grid show_post_date="normal"]
```

**show\_post\_comment**: display comment count, for example:

```
[post_grid show_post_comment="1"]
```

**show\_author\_name**: display post author name, for example:

```
[post_grid show_author_name="1"]
```

**author\_avatar**: display author avatar, for example:<br>

```
[post_grid author_avatar="1"]
```

**avatar\_size**: author avatar size, for example:

```
// sm, md, lg
[post_grid avatar_size="sm"]
```

**show\_post\_view**: display post view count, for example:<br>

```
[post_grid show_post_view="1"]
```

**post\_excerpt\_length**: display post excerpt, acceps a number, for example:

```
[post_grid post_excerpt_length="20"]
```

**hide\_thumbnail**: hide post thumbnail, for example:

```
[post_grid hide_thumbnail="1"]
```

**hide\_empty\_thumbnail**: do not display empty thumbnail posts, for example:

```
[post_grid hide_empty_thumbnail="1"]
```

**thumbnail\_size**: thumbnail image size, for example:

```
// thumbnail, medium, large, full, streamtube-image-medium or any defined size.
[post_grid thumbnail_size="large"]
```

**thumbnail\_ratio**: aspect ratio, for example:

```
// 1x1, 2x3, 16x9, 9x16, 21x9
[post_grid thumbnail_ratio="16x9"]
```

**pagination**: display pagination, for example:

```
// scroll, number
[post_grid pagination="click"]
```

**slide**: display slider, for example:

```
[post_grid slide="1"]
```

**slide\_rows**: number of slide row, for example:

```
[post_grid slide_rows="2"]
```

**slide\_dots**: display the slide dots, for example:

```
[post_grid slide_dots="1"]
```

**slide\_arrows**: display the slide arrows, for example:

```
[post_grid slide_arrows="1"]
```

**slide\_infinite**: sliding infinite , for example:

```
[post_grid slide_infinite="1"]
```

**slide\_speed**: sliding speed, for example:

```
[post_grid slide_speed="2000"]
```

**slide\_autoplay**: auto sliding, for example:

```
[post_grid slide_autoplay="1"]
```

**slide\_autoplaySpeed**

```
[post_grid slide_autoplay="2000"]
```

**hide\_if\_empty**: don't generate any html tag if no posts were found, for example:

```
[post_grid hide_if_empty="1"]
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://phpface.gitbook.io/streamtube/shortcodes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
