-
Notifications
You must be signed in to change notification settings - Fork 863
No default setting for "Mobile navigation layout" #1200
Comments
<?php if ( ! get_theme_mod( 'wpt_mobile_menu_layout' ) || get_theme_mod( 'wpt_mobile_menu_layout' ) === 'topbar' ) : ?>
<?php get_template_part( 'template-parts/mobile-top-bar' ); ?>
<?php endif; ?> @joelworsham that conditional in |
Just tested this on a new site. The top bar doesn't activate if you don't have a menu designated for mobile, otherwise it works as expected. |
There is conflicting code. The line you showed in https://github.com/olefredrik/FoundationPress/blob/master/header.php#L45-L47 The issue is, there is one other place that considers the https://github.com/olefredrik/FoundationPress/blob/master/library/custom-nav.php#L63-L67 This means that, if you have no |
Good find @joelworsham! Care to put in a pull request? What do you guys think the default should be? |
I'll see if I can get a chance! My vote would be topbar. |
How can this bug be reproduced?
What did you expect to happen?
I expect that, by default, the mobile menu uses the topbar layout. I expect this because if you visit the Customizer, without ever changing a setting, it is the initially checked radio field.
What happened instead?
The mobile navigation is broken entirely because there is nothing yet saved into the theme_mod, and the code that displays either/or mobile menu requires one of the 2 options to be saved to the database. In other words, it does not anticipate a default value.
Please List the Following:
OSX 10.13.2
8.6.0
2.10.4
node_modules/foundation-sites/package.json
) :6.4.3
The text was updated successfully, but these errors were encountered: