Mobile menu always open on mobile

Since the latest update of Sydney, the mobile menu stays open and can’t be toggled closed. Update: it only happens when the child theme is activated. But my child theme is very basic, just 2 functions and some mods to footer.php

Hi,

Can you share your child theme’s functions to Google Drive and link it here, so I can inspect and try it? Perhaps there is something I can correct with it.

Regards,
Kharis
aThemes Support

Trying to troubleshoot, I took out all the functions in functions.php so it is only this code below, and the problem is still there, mobile menu is toggled open. For now I can activate the main theme to eliminate the problem, but I wonder what the problem might be. If you have any ideas please let me know. It is only happening on this one site. I have 2 other sites with Sydney that don’t have the problem.

<?php /** * Sydney child functions * */ /** * Enqueues the parent stylesheet. Do not remove this function. * */ add_action( 'wp_enqueue_scripts', 'sydney_child_enqueue' ); function sydney_child_enqueue() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } /* ADD YOUR CUSTOM FUNCTIONS BELOW */

I think I solved it. I am using the plugin Insert Headers and Footers to put in the code for Google Analytics. The script was in the header, and I moved it to the footer. Now it seems like the problem is gone.

I have the same problem. I use this theme on 3 sites and the problem occurs only when there are sub-items under a main-item in the mobile menu.

I am not using any google code in header or footer

https://vijfkant.nl/ gives this problem (uses sub-items)
https://karensargsyan.com/ works fine (without sub-items)

Hi,

Try adding this CSS code to Appearance > Customize > Additional CSS from dashboard.

    #mainnav-mobi:not(.toggled) {
      display: none;
    }

Regards,
Kharis
aThemes Support

This works great! Problem solved
Thanks for the quick response!

Gerlof

1 Like

You’re welcome Gerlof!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis
aThemes Support

1 Like

FYI, I had the same problem and adding the CSS worked prefect.

1 Like

Hi!
I’m having the same issue on this website
https://www.glossaliebe.it
Mobile menu is always open.
The added CSS works only for the home page

Anny suggestions?.

#mainnav-mobi:not(.toggled) {
  display: none;
}

Hi,

I checked your website’s mobile menu and it works fine on my phone.

Here is the screen recording when checking.

https://drive.google.com/file/d/1HdWIcwRpz1Q6gPMoFEYDx2QkywPfdU6j/view?usp=sharing

Perhaps the current active cache hasn’t been flushed and it forces your web browser to not able to load the last changes.

Please clear your cache and try again.

Regards,
Kharis
aThemes Support