Skip to content

Instantly share code, notes, and snippets.

@pyronaur
Created May 23, 2017 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pyronaur/667e987f8c0c240b0125b9e855c8105b to your computer and use it in GitHub Desktop.
Save pyronaur/667e987f8c0c240b0125b9e855c8105b to your computer and use it in GitHub Desktop.
<?php
function seventeen_child_video_condition() {
return (is_front_page() || ( function_exists('phort_is_portfolio') && phort_is_portfolio() ) );
}
// Modify the header arguments
// PHP 5.3+
add_filter('twentyseventeen_custom_header_args', function($args){
$args['video-active-callback'] = 'seventeen_child_video_condition';
return $args;
});
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment