Adding header video in custom pages

Twenty Seventeen WordPress theme has video support for headers. By default, the video header is only allowed on the front page, but there is an easy way to customize that using hooks by tapping into twentyseventeen_custom_header_args

All you need to do is write a function that’s going to determine whether a video is supported on your current page, and with hooks make sure Twenty Seventeen theme tells WordPress to ask that function whether or not a video is supported on the current page.

In my case, I’m using phort_is_portfolio()¬†function to allow video header in all portfolio pages, like this: