YouTube

01 Add your channel ID

  1. Go to Layout
  2. Open the "Latest Videos" widget (if your theme doesn't already have this widget, add the code below to a HTML/JavaScript widget)
  3. Replace YOUR-CHANNEL-ID with your ID
  4. You can replace Latest Videos in the code with a different title

02 Add a YouTube widget to the sidebar

Copy the same code, but change is-row to is-column.


03 YouTube widget code

<script>
$.ajax({
url:'https://www.googleapis.com/youtube/v3/channels',
type:'GET',
dataType:'json',
data: {
'part':'contentDetails',
'id': 'YOUR-CHANNEL-ID',
'key': 'AIzaSyBgJEP17gcZWruSPUFnPKC96vP1tzW8U3k'
},
success: function(data){
var uploads = data.items[0].contentDetails.relatedPlaylists.uploads;
getVideos(uploads);
}
});
</script>
<div class="youtube-wrapper"><div class="youtube-wrap">
<h3 class="title">Latest Videos</h3>
<div class="youtube is-row"></div>
</div></div>