Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter james291924

    (@james291924)

    I’ve found that this script was calling nothing.

    <script type=”text/javascript”>
    var stm_sticky = ”;
    </script>

    The simple fix was to add the element name (still some styling issues though).

    <script type=”text/javascript”>
    var stm_sticky = ‘bottom’;
    </script>

    Hello,
    We glad that you have resolved the problem. Please let us know if there any problems else.
    regards

    Hi f3l1x and StyleMix author

    If you want this fixed in the plugin code itself, have a look at line 16 in hb_templates/main.php

    The database option is not retrieve 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>

    One other optimization could be that if no sticky is selected (value becomes empty) to 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 );
    }

    Thanks,
    Ruud

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sticky Header Not Working’ is closed to new replies.