GS YouTube Gallery’s shortcode usage
[gs_ytgal theme="gs_ytgal_grid"]
GS YouTube Gallery’s Shortcode attributes Usage
[gs_ytgal channel_id="UCANLZYMidaCbLQFWXBC95Jg" count="10" orderby="date" theme="gs_ytgal_grid" cols="6" video_height="350" title_limit="40" desc_limit="120"]
Shortcode PHP Usage
<?php echo do_shortcode( '[gs_ytgal theme="gs_ytgal_grid"]' ); ?>
Template Usage – Add the shortcode anywhere you need to display GS YouTube Gallery in template files (header.php, front-page.php, etc.)
<?php echo do_shortcode( '[gs_ytgal channel_id="UCANLZYMidaCbLQFWXBC95Jg" count="10" orderby="date" theme="gs_ytgal_grid" cols="6" video_height="350" title_limit="40" desc_limit="120"]' ); ?>
| No. | Attribute | Default value | options | Description |
|---|---|---|---|---|
| 1 | channel_id | None | YouTube Channel ID | Add your YouTube Channel ID. https://www.youtube.com/channel/UCB0SU0JDMMECS9BGJtD7lzg Here UCB0SU0JDMMECS9BGJtD7lzg is the channel Id. Note : If you add both Channel Id & Playlist Id at Settings then videos from Playlist will display. |
| 2 | playlist_id | None | YouTube Playlist ID | Add your YouTube Playlist ID. https://www.youtube.com/playlist?list=PLDIoUOhQQPlXqz5QZ3dx-lh_p6RcPeKjv Here PLDIoUOhQQPlXqz5QZ3dx-lh_p6RcPeKjv is the Playlist Id. |
| 3 | count | 10 | 50 | Set number of Videos to display. Default 10, max 50 |
| 4 | orderby | date | date rating title videoCount viewCount |
Select preferred orderby value to display Videos. |
| 5 | theme | gs_ytgal_grid | gs_ytgal_grid gs_ytgal_grid_details gs_ytgal_hoverpop gs_ytgal_right_info gs_ytgal_left_info gs_ytgal_popup gs_ytgal_slider_popup gs_ytgal_slider |
Select preferred theme to display Videos |
| 6 | cols | 3(4 columns) | 6 (2 columns) 4 (3 columns) 3 (4 columns) |
Number of column/s to display videos. Columns are based on 12 grids Bootstarp, so follow columns value |
| 7 | video_height | 350 | Any numeric value you need. | Sometimes video heighs are different & layout can be broken. In that case you can set video height. |
| 8 | title_limit | 40 | Any numeric value you need. | Set maximum number of characters in Video Title. Default 40 |
| 9 | desc_limit | 120 | Any numeric value you need. | Set maximum number of characters in Video details. Default 120 |