Get DevWP - WordPress Development Theme

How to Add a Custom YouTube Video Header in your WordPress Theme

Have you thought about using a YouTube Video as a Custom Header on your WordPress Powered Website?

The basic steps are you would go to:

  • Appearance
  • then Customize
  • then proceed to the Header Section
  • and place the URL to the YouTube Video you want to display.

Seems easy enough right?

Well, if you don’t mind the default settings of no sound and auto-play without the ability to change these settings, then you’re good to go. But if you want to have sound and not have it set to auto-play, then how do you change this type of functionality when there are no settings to alter this behavior?

There’s Always A Way!

  • You can add the custom code needed to enable this feature. Only attempt this if you’re the original theme developer and code updates are handled by you.
  • You can create a custom plugin that works in conjunction with your theme.
  • Or you can create a child theme to the parent theme that you’re using. By doing it this way, you won’t lose your custom code. I created a video where I demonstrate this process.

Watch the Video Above

The video at the top of this post where I show you how to enable this functionality is part of a larger YouTube Playlist titled WordPress Theme Development with DevWP.

If you’re looking to create a child theme, then watch this video on How To Create a WordPress Child Theme where I demonstrate how to get this functionality in a way where you won’t lose your custom code when the original theme developer updates the theme.

If you want to go the route of creating a WordPress Plugin, then subscribe to my YouTube Channel PixemWeb so you’ll be notified when that playlist becomes available. It’s in the works.

Are You Ready to Get Your Hands Dirty and Start Coding?

The process of adding the custom video header with sound and other settings by customizing the code in our DevWP theme isn’t that difficult. What it entails is changing the default way WordPress calls in the wp-custom-header and hosting the script locally in your own theme and changing the settings to suit your needs. It’s best to do it in a theme that you control because if you change the code in the WordPress Core files, you will lose your custom code when WordPress gets updated.

The full demonstration is shown in the video above and you will get a step by step walk through on how to get this done in a way that gives you complete control on how videos are displayed in the Custom Header of your WordPress Website.

If you want to get the code in advance, then get the DevWP WordPress Development Training Theme and you will have all the code in the video and all updates made to the theme.

About DevWP

DevWP is a training theme that I’m actively working on and showcasing all the code with nothing hidden in a video series on my YouTube Channel. The goal is to teach people how to code a WordPress Theme that they can use on their websites or their clients websites.

DevWP Videos Viewed by Thousands

To date, thousands of people have viewed, commented, thumbs-up, shared and purchased the actual theme itself. The videos are extremely thorough and I explain everything I’m doing as I go through the process of coding the theme.

The main ingredients of DevWP are the Underscores Starter Theme and Bootstrap 4 along with custom code all combined to make a fully responsive, SEO ready theme that can be used for learning purposes or for production websites.

You can learn more about the theme by watching the videos or taking a look at the demo for the DevWP WordPress Development Training Theme.



View Our Themes