> For the complete documentation index, see [llms.txt](https://docs.clipbucket.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clipbucket.com/guides/functions/get_videos.md).

# get\_videos

{get\_videos} is used to include your desired videos into the array. You have handful of parameters at your disposal.

**Usage**

```
{get_videos parameters}
```

It can use following parameters

| Parameter Name | **Options**                                                                                                                                                                                                                                                 |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| assign         | Store the result(Array) to this variable                                                                                                                                                                                                                    |
| active         | <p>Get active videos:</p><ul><li>yes</li><li>no</li></ul>                                                                                                                                                                                                   |
| broadcast      | <p>Type of video:</p><ul><li>public</li><li>private</li></ul>                                                                                                                                                                                               |
| category       | <p>Specific category videos. Multiple categories should be separated with comma ‘,’:</p><ul><li>Category ID.</li></ul>                                                                                                                                      |
| count\_only    | <p>Set to true if you only want to count result:</p><ul><li>true</li><li>false</li></ul>                                                                                                                                                                    |
| date\_span     | <p>Get videos for specific time frame:</p><ul><li>all\_time</li><li>today</li><li>yesterday</li><li>this\_week</li><li>last\_week</li><li>this\_month</li><li>last\_month</li><li>this\_year</li><li>last\_year</li></ul>                                   |
| exclude        | <p>Exclude video from result:</p><ul><li>Video ID</li></ul>                                                                                                                                                                                                 |
| featured       | <p>Get featured video:</p><ul><li>yes</li><li>no</li></ul>                                                                                                                                                                                                  |
| limit          | <p>Number of results you want:</p><ul><li>Numercial Figure</li></ul>                                                                                                                                                                                        |
| nouser         | <p>It will exclude provided userid’s videos from result:</p><ul><li>User ID</li></ul>                                                                                                                                                                       |
| order          | <p>Sort your result. You also need to tell how to order your result. asc OR desc, e.g ‘videoid desc’</p><ul><li>videoid</li><li>title</li><li>date\_added</li><li>views</li><li>rating</li><li>last\_viewed</li><li>featured\_date</li><li>RAND()</li></ul> |
| show\_related  | <p>Set to if you want to show related videos. For this to work properly, also provide title & tags:</p><ul><li>true</li><li>false</li></ul>                                                                                                                 |
| status         | <p>Video Status:</p><ul><li>Successful</li><li>Processing</li><li>Failed</li></ul>                                                                                                                                                                          |
| tags           | <p>Video Tags. Multiple tags should be separated with comma ‘,’:</p><ul><li>Tags</li></ul>                                                                                                                                                                  |
| title          | <p>Video Title:</p><ul><li>Title</li></ul>                                                                                                                                                                                                                  |
| user           | <p>User specific videos:</p><ul><li>User ID</li></ul>                                                                                                                                                                                                       |
| videoid        | <p>Specific video with video id:</p><ul><li>Video ID</li></ul>                                                                                                                                                                                              |
| videokey       | <p>Specific video with video key:</p><ul><li>Video Key</li></ul>                                                                                                                                                                                            |

#### Examples

**Example 1**

```
{get_videos assign=custom_videos limit=10 featured="yes"}
```

Above code will get first 10 featured videos and stores the array in {$custom\_videos} varible. Now we will loop through the variable to display the videos.

```
{section name=cv_list from=$custom_videos}
	{include file="$style_dir/blocks/video.html" video=$custom_videos[cv_list]}
{/section}
```

\[post\_link id=”199″] and \[post\_link id=”237″]

**Example 2**

```
{get_videos assign=usr_feats active="yes" featured="yes" limit=5 order=" featured_date desc" user=1}
```

This will get first 5 active featured videos of user with ID “1” and will sort them according to their featured\_date from lasted to oldest. {$usr\_feats} contains loop. Time to display.

```
{section name=u_feat from=$usr_feats}
	{include file="$style_dir/blocks/video.html" video=$usr_feats[u_feat]}
{/section}
```

![](https://clipbucket.com/docs/wp-content/plugins/wp-postratings/images/loading.gif)Loading...
