get_videos
{get_videos} is used to include your desired videos into the array. You have handful of parameters at your disposal.
Usage
It can use following parameters
Parameter Name | Options |
assign | Store the result(Array) to this variable |
active | Get active videos:
|
broadcast | Type of video:
|
category | Specific category videos. Multiple categories should be separated with comma ‘,’:
|
count_only | Set to true if you only want to count result:
|
date_span | Get videos for specific time frame:
|
exclude | Exclude video from result:
|
featured | Get featured video:
|
limit | Number of results you want:
|
nouser | It will exclude provided userid’s videos from result:
|
order | Sort your result. You also need to tell how to order your result. asc OR desc, e.g ‘videoid desc’
|
show_related | Set to if you want to show related videos. For this to work properly, also provide title & tags:
|
status | Video Status:
|
tags | Video Tags. Multiple tags should be separated with comma ‘,’:
|
title | Video Title:
|
user | User specific videos:
|
videoid | Specific video with video id:
|
videokey | Specific video with video key:
|
Examples
Example 1
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.
[post_link id=”199″] and [post_link id=”237″]
Example 2
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.
Last updated