Site logo

Archived topic

Remove secondary menu toggle

1 reply · Started by johnaps on December 10, 2020

Viewing posts 1–2 of 2

Hello!
I want to fix a cls issue where in the first milliseconds of loading my pages the toggle is visible thus creating a little cls issue.

I already have
.secondary-navigation .menu-toggle {
display: none;
}
but that takes some milliseconds to apply itself so i think the only way to resolve this is remove the toggle element completely somehow as i am not using it...
<button class="menu-toggle secondary-menu-toggle"> is the unessessary html element...

Can you provide me with a solution that doesnt otherwise break me secondary menu items as is displayed...

Hi there,

there is no easy way to 'remove' the toggle. The issue comes from your WP Rocket Critical CSS - it is not the only element on your page that is being affected by this - other elements styles are being loaded late because of that and causing CLS issues.

Unless you are able to write your own Critical CSS i would recommend you do not use the automatice critical css option.

This archived topic is closed to new replies.