• Resolved pskiebe

    (@pskiebe)


    plugin version: 0.1
    theme: custom theme

    as mentioned in other forum posts, panel.js isn’t loaded sometimes. a quick fix that worked for me:
    change last argument of function wp_enqueue_script on line 77 in sliding-panel.php to false. this loads panel.js in the header. seems to be an issue with some themes not loading footer scripts correctly.

    sliding-panel.php, line 77:
    wp_enqueue_script( 'sliding-panel-js', SLIDING_PANEL_URL . '/panel.js', array( 'jquery' ), '0.1', true );
    to
    wp_enqueue_script( 'sliding-panel-js', SLIDING_PANEL_URL . '/panel.js', array( 'jquery' ), '0.1', false );

    for me it does the trick but i’m open for any suggestions on how to solve this properly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Justin Tadlock

    (@greenshady)

    Most likely, your theme doesn’t appropriately call the wp_footer hook.

    Thread Starter pskiebe

    (@pskiebe)

    *facepalm*
    Thanks a lot, that was exactly the problem. I inserted the wp_footer hook:
    wp_footer();
    in my theme’s footer.php just before the closing </body> tag and erverything is working smoothly now. panel.js is added to the footer as it is supposed to without any modifications to the plugin code.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Sliding Panel] panel not opening with custom theme – quick fix’ is closed to new replies.