Last active
December 8, 2016 05:53
-
-
Save gatespace/0b8000e13072d828f51b8293afa50cbb to your computer and use it in GitHub Desktop.
WordPress テーマカスタマイザーで動画を追加して出力(ver 4.7以降の場合) ref: http://qiita.com/gatespace/items/760533f0c90095cc6571
This file contains hidden or 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
<button type="button" id="wp-custom-header-video-button" class="wp-custom-header-video-button wp-custom-header-video-play">Pause</button> |
This file contains hidden or 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
<button type="button" id="wp-custom-header-video-button" class="wp-custom-header-video-button wp-custom-header-video-pause">Play</button> |
This file contains hidden or 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 the_custom_header_markup(); ?> |
This file contains hidden or 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 | |
function themename_custom_header_setup() { | |
$args = array( | |
'default-image' => get_template_directory_uri() . 'img/default-image.jpg', | |
'default-text-color' => '000', | |
'width' => 1000, | |
'height' => 250, | |
'flex-width' => true, | |
'flex-height' => true, | |
'video' => true, | |
) | |
add_theme_support( 'custom-header', $args ); | |
} | |
add_action( 'after_setup_theme', 'themename_custom_header_setup' ); |
This file contains hidden or 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
.wp-custom-header iframe, | |
.wp-custom-header img, | |
.wp-custom-header video { | |
display: block; | |
height: auto; | |
max-width: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment