Created
March 29, 2018 19:47
-
-
Save kathrynwp/a2d858153f24c20ba3bb8953021a0739 to your computer and use it in GitHub Desktop.
Twenty Seventeen Child - display video on mobile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Twenty Seventeen Child Theme functions | |
* | |
* @link https://developer.wordpress.org/themes/basics/theme-functions/ | |
* | |
* @package WordPress | |
* @subpackage Twenty_Seventeen | |
* @since 1.0 | |
*/ | |
/* | |
* Enqueue parent and child theme styles. | |
*/ | |
function twentyseventeenchild_enqueue_styles() { | |
$parent_style = 'twentyseventeen-parent-style'; | |
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'twentyseventeenchild_enqueue_styles' ); | |
/* | |
* Change the minimum screen size to use the video header | |
*/ | |
function twentyseventeenchild_video_size( $settings ) { | |
$settings['minWidth'] = 100; | |
$settings['minHeight'] = 100; | |
return $settings; | |
} | |
add_filter( 'header_video_settings', 'twentyseventeenchild_video_size' ); |
Hi Kathryn,
I really need so help to get this to work. I've tried setting up a child theme for the first time and it is not working properly, If you can give me a step by step of what to do as a beginner that would very very much be appreciated.
David
Is it possible to unmute the header video sound modify 'header_video_settings' filter?
Is it possible to unmute the header video sound modify 'header_video_settings' filter?
Hi @smjuber - this isn't a support venue, so if you have questions about Twenty Seventeen, please post in the forum:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change the 100 value on lines 25 & 26 if you want to change the minimum width or height at which video is served.
Use this file with https://gist.github.com/kathrynwp/cc72b0679760fecf014df1d173109f14