JoryHogeveen/off-canvas-sidebars

Trigger not working

vanbrew opened this issue · 8 comments

Description

Hey there, I have completed the theme setup (using simple theme setup) and created a side menu. I've added the trigger to my header but it doesn't trigger the menu. When I inspect the element I can see it's all there.

Specifications

  • Plugin Version: 0.5.4
  • WordPress Version:
  • Other plugins installed: ACF Pro, Classic Editor, Easy Updates Manager, White Label CMS
  • Theme: Blankslate
  • Browser: Chrome

Hello @vanbrew

Please provide the following information so I can see what is happening:

  • Link to a page where this occurs
  • Or if that is a local environment:
    • Javascript error log
    • The HTML of that page
    • header.php and footer.php of your theme (screenshot is also fine).
    • If this is private information, please send it to info@keraweb.nl

When I inspect the element I can see it's all there.

I think it might be there but on the wrong location.

Hello @vanbrew

You have an error in your page:
Uncaught ReferenceError: Baseliner is not defined at window.onload ((index):16)
Not sure what it is but that will need to be fixed first.

Hmm this is weird.. for some reason the script won't initialize.
If I run ocsOffCanvasSidebars.init() in the console everything works fine..

I think I've found the issue.

It looks like wp_footer(); is called before the website_after hook.
It should be called after that:
https://github.com/JoryHogeveen/off-canvas-sidebars/wiki/Theme-setup#simple-theme-setup

No problem!
Also, if you like the plugin, please consider leaving a nice review, it will help the plugin grow 🙂
https://wordpress.org/support/plugin/off-canvas-sidebars/reviews/
Thanks, Jory