Last active
October 11, 2021 08:10
-
-
Save rocket-martue/d64d4ecbc7ca84d3e8adcf5179aa1666 to your computer and use it in GitHub Desktop.
Snow Monkey のヘッダー位置をカスタマイズする
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 | |
add_filter( | |
// PC 用ヘッダー位置をカスタマイズ | |
'theme_mod_header-position-lg', | |
function( $value ) { | |
// フロントページならば | |
if ( is_front_page() ) { | |
// オーバーレイ(上部固定 / スクロール時背景白) | |
return 'sticky-overlay-colored'; | |
} | |
// それ以外はカスタマイザーで設定したヘッダー位置 | |
return $value; | |
} | |
); | |
add_filter( | |
// ヘッダー位置をカスタマイズ | |
'theme_mod_header-position', | |
function( $value ) { | |
// フロントページならば | |
if ( is_front_page() ) { | |
// オーバーレイ(上部固定 / スクロール時背景白) | |
return 'sticky-overlay-colored'; | |
} | |
// それ以外はカスタマイザーで設定したヘッダー位置 | |
return $value; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment