Display Video Header Media on All Pages

This is a Developer Level doc.

If you're unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from a professional. Under our Support Policy, we don't provide support for modifications and customization.

By default, header media in video format (Customize > Header > Header Media) will display only on the homepage. This is controlled by the is_header_media_active() function in the WordPress Core files.

If you want to display header media video on all website pages, you can use the following PHP snippet:

// Display header media video on all website pages.
function modify_custom_header_args( $args ) {
$args['video-active-callback'] = '__return_true'; 
return $args; 
} 
add_filter( 'ocean_custom_header_args', 'modify_custom_header_args' ); 

if ( ! function_exists( 'is_header_video_active' ) ) { 
function is_header_video_active() { return true; } 
}

All PHP snippets should be added via a child theme's functions.php file.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.