Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Offcanvas menu not working #720

Closed
MarineLB opened this issue Feb 9, 2016 · 10 comments
Closed

Offcanvas menu not working #720

MarineLB opened this issue Feb 9, 2016 · 10 comments

Comments

@MarineLB
Copy link

MarineLB commented Feb 9, 2016

Hi, i'm using the latest version of FoundationPress, i noticed that in header.php this line of code called the mobile menu :
<?php if ( ! get_theme_mod( 'wpt_mobile_menu_layout' ) || get_theme_mod( 'wpt_mobile_menu_layout' ) == 'topbar' ) : ?> <?php get_template_part( 'parts/mobile-top-bar' ); ?> <?php endif; ?>
so i tried to replace top-bar by off-canvas (as the off-canvas.php exists)
It does show a menu, but it definitely does not work like an offcanvas menu..
please help ?

@olefredrik
Copy link
Owner

Hi, @MarineLB !

Did you set the mobile menu to be displayed as an offcanvas menu in the customizer?

customizer

@MarineLB
Copy link
Author

MarineLB commented Feb 9, 2016

ohhh i was looking for this setting !
i did just make the change, however it still doesn't appear !

@olefredrik
Copy link
Owner

Did you check the mobile option in Appearance -> Menus in wp-admin?

menu-settings

@MarineLB
Copy link
Author

MarineLB commented Feb 9, 2016

Yep, it's checked.
I noticed something : the off-canvas menu does show in the chrome devtools, however it's hidden on the left (maybe some js is not being loaded ?) and its z-index was too low (9 worked)
Still : there is no top bar with the burger icon at all

@olefredrik
Copy link
Owner

Sounds like something weird has happened. If you roll back the changes you just did in the .php files, what errors do you get in the devtools console (chrome)?

@MarineLB
Copy link
Author

MarineLB commented Feb 9, 2016

There was no particular errors in the console ! (I returned the header.php to its previous condition)

@olefredrik
Copy link
Owner

Hmm. I just pulled the latest master branch to my local dev install, did an npm run build and fired it up on localhost. The offcanvas is functioning as expected here, so it's quite difficult to troubleshoot as I'm unable to reproduce the error.

@MarineLB
Copy link
Author

MarineLB commented Feb 9, 2016

i actually might not have the latest version (it's older than 2 days ago). i'll try to add the changes and see if it works !
thanks for your help !

@MarineLB
Copy link
Author

MarineLB commented Feb 9, 2016

Well i've updated all the changes related to the topbar issue, but i still don't get the hamburger icon

here's how it looks like :
capture d ecran 2016-02-09 a 15 34 57

PS: i have changed the width:250px; to width:100% and modified the left:250px; toleft:0; and added z-index)

@olefredrik
Copy link
Owner

Both off-canvas and hamburger icon works on a fresh install. Unfortunately I have not the ability to debug on a remote dev environment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants