Dear developers of WoodMart,
The mobile menu doesn’t seem to work, because JavaScript can’t find ul.wd-active
. This error appears:
mobileNavigation.min.js?ver=7.4.3:1 Uncaught TypeError: Cannot read properties of null (reading 'length')
at woodmartThemeModule.mobileNavigation (mobileNavigation.min.js?ver=7.4.3:1:608)
at mobileNavigation.min.js?ver=7.4.3:1:5907
Taking a look at PHP file /woodmart/inc/template-tags/template-tags.php
I can see that the class wd-active
is removed from variable $pages_active
and appended to variable $categories_active
if setting <b>Swap menus</b> is toggled on in the header builder.
This setting can only be toggled on/off when option <b>Show categories menu</b> is enabled.
However, if you toggle option <b>Swap menus</b> on and toggle option <b>Show categories menu</b> off, that this settings stays enabled.
This causes a problem, because the PHP-file does not take into account whether or not option <b>Show categories menu</b> is toggled on.
<b>Solution:</b>
Add a check in the PHP-file to only move class wd-active
to the categories menu if the categories menu is enabled, because otherwise class wd-active
is taken away from the only menu that is left.
To fix this we disabled option <b>Swap menus</b> and then disabled option <b>Show categories menu</b>.
Kind regards,
Thijs Terluin
Webreturn