When WordPress 4.7 was released, an option to use a header video instead of an image was added to the Customizer. Including the feature in a theme like Arcade seemed like a good idea but took me a while to finally get right.
Video Header Code
Including support for a video header is straightforward enough.
add_theme_support( 'custom-header', array( 'video' => true,
If you already declare support for a custom header you can just add
'video' => true, to the argument array.
In order for the new header video to appear in your theme, you need to place the
the_custom_header_markup() function in the right spot. To get it working in Arcade took some custom CSS and a few changes to the core PHP code but I managed to figure it all out.
Header Media Section
With that in place, the Header Image section of the Customizer will now become the Header Media section, and a button to select/upload a video or include a YouTube link will appear.
If you already have a license for Arcade, be sure to update your copy to the latest release to play around with the new Header Video option. If not, head on over to Themes by bavotasan.com and purchase your copy today.
For more info on the Header Video functions check out the info page on Make WordPress Code.
The post New Video Header Option in Arcade appeared first on bavotasan.com.