カスタム機能まとめ
記述場所:functions.php
// カスタムヘッダー画像
add_theme_support('custom-header',array(
'width' => 1200, // 横
'height' => 400, // 縦
'header' => false // trueでも
));
出力例:index.php
1:
<div style="background-image:url<?php header_image(); ?>">
2:
<div class="A">
<?php if(get_header_image() ): ?>
<div style="background-image:url<?php header_image(); ?>">
<?php endif;>
</div>