开发者 | braceomatic88 |
---|---|
更新时间 | 2023年4月5日 00:34 |
PHP版本: | 5.4 及以上 |
WordPress版本: | 5.7 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
WordPress Alert Bar comes with a filter that allows you to define your sites fixed header so that it can account for the alert bar. Simply navigate to the functions.php file in your child theme and paste in the following code snippet, making sure to replace .site-header with the class or ID of your sites fixed position header.
// Define fixed header for Wordpress Alert Bar add_filter( 'mbwpab_fixed_header_selector', 'mbwpab_define_fixed_header' ); function mbwpab_define_fixed_header( $header ) { $header = '.site-header'; return $header; }