Support » Plugin: WordPress Header Builder Plugin – Pearl » Sticky header not working fix

  • Resolved Ruud Laan


    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.php

    The 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 ) ); ?>';

    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.


    • This topic was modified 1 year, 9 months ago by Ruud Laan.
Viewing 1 replies (of 1 total)
  • Hello,

    Thank you very much for that. We will inform our dev team and they will include the needed fixes in the coming update of the theme.


Viewing 1 replies (of 1 total)
  • The topic ‘Sticky header not working fix’ is closed to new replies.