Sticky header not working fix
-
Hi StyleMix,
I think I found the issue related to the sticky option not working.
Have a look at line 16 in hb_templates/main.phpThe database option is not retrieved correct, and the line should be:
<script type="text/javascript"> var stm_sticky = '<?php echo esc_js( stm_hb_get_option( 'header_sticky', '', $hb ) ); ?>'; </script>
To further optimize the output, in case no sticky is selected (value becomes empty) the code could check for that:
$stm_sticky = esc_js( stm_hb_get_option( 'header_sticky', '', $hb ) ); if ( ! empty ( $stm_sticky ) ) { echo sprintf( '<script type="text/javascript">var stm_sticky = \'%s\';</script>', $stm_sticky ); }
Let me know what you think and if this can be added into an upcoming version of the plugin.
Thanks,
Ruud
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Sticky header not working fix’ is closed to new replies.