@@ -554,7 +554,7 @@ public function body_classes( $classes ) {
554
554
555
555
$ classes [] = 'custom-header ' ;
556
556
557
- if ( get_theme_mod ( 'bgtfw_fixed_header ' ) ) {
557
+ if ( get_theme_mod ( 'bgtfw_fixed_header ' ) || apply_filters ( ' crio_premium_get_sticky_page_header ' , $ post_id ) ) {
558
558
if ( 'header-top ' === get_theme_mod ( 'bgtfw_header_layout_position ' ) ) {
559
559
$ classes [] = 'header-slide-in ' ;
560
560
} else {
@@ -1363,12 +1363,6 @@ public static function dynamic_header() {
1363
1363
* @return string Rendered HTML for dyanmic layout element.
1364
1364
*/
1365
1365
public static function dynamic_sticky_header ( $ preset = null ) {
1366
- $ markup = '' ;
1367
- $ markup .= '<header id="masthead-sticky" ' . BoldGrid::add_class ( 'header ' , [ 'header ' , 'sticky ' ], false ) . '> ' ;
1368
- ob_start ();
1369
- do_action ( 'boldgrid_header_top ' );
1370
- $ markup .= ob_get_clean ();
1371
-
1372
1366
if ( ! is_front_page () && is_home () ) {
1373
1367
$ id = get_option ( 'page_for_posts ' );
1374
1368
} else {
@@ -1377,8 +1371,30 @@ public static function dynamic_sticky_header( $preset = null ) {
1377
1371
1378
1372
$ page_header = apply_filters ( 'crio_premium_get_sticky_page_header ' , $ id );
1379
1373
1374
+ $ sticky_template_class = get_theme_mod ( 'bgtfw_sticky_page_headers_global_enabled ' ) && ! empty ( $ page_header ) ? 'sticky-template- ' . $ page_header : '' ;
1375
+
1376
+ $ header_classes = array (
1377
+ 'header ' ,
1378
+ 'sticky ' ,
1379
+ );
1380
+
1381
+ if ( ! empty ( $ sticky_template_class ) ) {
1382
+ $ header_classes [] = $ sticky_template_class ;
1383
+ }
1384
+
1385
+ $ markup = '' ;
1386
+ $ markup .= '<header id="masthead-sticky" ' . BoldGrid::add_class ( 'header ' , $ header_classes , false ) . '> ' ;
1387
+ ob_start ();
1388
+ do_action ( 'boldgrid_header_top ' );
1389
+ $ markup .= ob_get_clean ();
1390
+
1380
1391
if ( get_theme_mod ( 'bgtfw_sticky_page_headers_global_enabled ' ) && ! empty ( $ page_header ) ) {
1381
1392
if ( 'disabled ' !== $ page_header ) {
1393
+ error_log (
1394
+ 'page_header: ' . json_encode (
1395
+ apply_filters ( 'the_content ' , get_post_field ( 'post_content ' , $ page_header ) )
1396
+ )
1397
+ );
1382
1398
$ markup .= apply_filters ( 'the_content ' , get_post_field ( 'post_content ' , $ page_header ) );
1383
1399
}
1384
1400
} else {
0 commit comments