Porto

Create the file app/design/frontend/Smartwave/porto/Ves_Megamenu/layout/default.xml and enter code

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
	<body>
                <referenceBlock name="store.menu">
			<block class="Ves\Megamenu\Block\Menu" name="sw.topnav" template="Ves_Megamenu::topmenu.phtml" ttl="3600" before='-'>
				<arguments>
					<argument name="alias" xsi:type="string">top-menu</argument>
				</arguments> 
			</block>
		</referenceBlock>
	</body>
</page>

Run command:

php bin/magento setup:upgrade --keep-generated

Then refresh cache in the backend or run the command

php bin/magento cache:clean

Last updated