Skip to main content
1 of 2

I created my own default.xml file in

/app/design/frontend/YOUR_COMPANY/YOUR_THEME/Magento_Theme/layout/default.xml

And I've added these lines:

<referenceBlock name="catalog.topnav" remove="true"/>

<referenceBlock name="store.menu">
    <block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav.fix" template="Magento_Theme::html/topmenu.phtml" before="-"/>
</referenceBlock>

It's running for me without problems with Varnish.

Note: I've added "catalog.topnav" again without TTL parameter (just trying to remove or reset it doesn't work. It needs to be created again.)