Site logo

Archived topic

Mobile menu superimposed over header

10 replies · Started by Tom on October 11, 2021

Viewing posts 1–11 of 11

Hi, I'd like to have the mobile hamburger menu appearing superimposed over the left end of the site header (but with the search appearing below), and the header logo centred at 50% of the page width.

You previously gave me CSS to do this with ShiftNav Pro but now I'd like to revert to the GP mobile menu instead.

The site is learnaboutfilm.com

Thanks

Also I've just realised that with my current setup the mobile menu isn't working unless I'm logged in to WordPress. It appears to work in the Customizer.

Hi there,

can you disable any cache/optimization plugins you may be using on the site so i can see whats going on?

Hi David, the menu works if I turn off WPRocket, Perfmatters and Autoptimize, so there's obviously a conflict there that I need to address.

I'd still like to know how the answer to my original question.

Thanks

In Customizer > Layout > Header - enable the Mobile Header and add a mobile header logo.
Once thats in place i can provide the CSS to center the logo and position the hamburger to left an search right ( if required )

Thanks David. I've done that. Looks fine with hamburger and search on right. How do I increase the size of the mobile header logo?

Try this CSS:

#mobile-header .site-logo.mobile-header-logo img {
    padding: 0;
}

Thanks, that works!

Glad to be of help

Sorry David, me again. I've tracked down the problem with the mobile menu not working when WP Rocket is enabled. It happens when 'Minify JS' is activated.

Could you suggest which files I need to exclude from minification so that the menu works? Thanks.

Try excluding:

main.min.js

It may require a long path - if the above doesn't work then try:

/generatepress/assets/js/main.min.js

This archived topic is closed to new replies.