开发者 | braceomatic88 |
---|---|
更新时间 | 2025年1月14日 09:17 |
PHP版本: | 5.4 及以上 |
WordPress版本: | 6.7.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
WP 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 WP Alert Bar add_filter( 'mbwpab_fixed_header_selector', 'mbwpab_define_fixed_header' ); function mbwpab_define_fixed_header( $header ) { $header = '.site-header'; return $header; }