Requirements
- This is available only on the Faculty and Department theme.
- UBCO Video Slider is activated. If not, please put a ticket in the UBC Self Service Portal.
How to add a Video Slider component
The UBCO Video Slider plugin can be used to make a YouTube Video carousel. The plugin allows users to generate a shortcode that places a YouTube Video Carousel on any page or post. To create a carousel:
- Go to the page or post that you want to display the slider.
- Click on ‘Add New Page Section’ -> ‘Page Section’ -> ‘Add New Inside Content Row’ -> select the columns you prefer -> ‘Add Component’ -> ‘Standard Editor’
- Click on the ‘Add UBCO Video Slider’ button
- On the options screen, enter the id of your YouTube playlist. For multiple playlists, separate playlist IDs with a comma. For help finding your playlist id, see How to find the YouTube playlist ID.
- Title – you can specify a title for your video slider
- Thumbnail Width – width of each slide’s thumbnail
- Thumbnail Margin – the margin between each slide
- Container Margin – sets the specified margin around the slider.
- Open Video as a popup – If set to yes, the video will open as a popup. If set to no, the video will open on YouTube.
- Show View Count – If set to yes, number of views for each video will be displayed.
- Look and Feel – select from the following look and feel of sliders (e.g. Standard, Transparent, and Standard Red).
- Max Slides – sets the maximum number of slides to display
- Auto-play Slides – the slider will autoplay upon page load
- Press the “Insert Shortcode” and it will insert the shortcode to the editor.
- Click Preview to often test your video slider. Make edits as necessary.
- Publish/Update when ready to go live.
How to Find the YouTube Playlist Id?
- Go to your YouTube Channel
- Click on the Playlists tab and click the playlist that you want to display
3. As the playlist opens up, copy the id from the URL bar.
How to get a YouTube API Key?
- Go to Google Developers Console and log in with your Google account.
- Create the new project (name does not matter for the plugin).
- Go to your project (by clicking on its name in the list).
- In the sidebar on the left, expand APIs & Services. Next, click Library. Search for YouTube, and select the YouTube Data API (v3) and enable it.
- On the YouTube Data API v3 page, click on the Create Credentials button to generate an API Key.
- You will be calling the API from a web browser and will be accessing publicly available data.
- Copy and paste the generated API key to the plugin’s settings page.