Magento 2.2.5 – How to Add Custom Menu in Top Nav Section

customizemagento-2.2.5navigationtoplinks

I'm trying to add custom menu in top nav section or place any custom menu removing the existing one. How to customise this section. Please tell me step by step. I'm unable to do this after the searching in google also, i'm little newbie in magento 2.2.5

Best Answer

You have 2 options here 1 either you use some free extension like IBNAB Menu Mgento menu or 2nd option is create CMS block and add your custom menu html code there then remove your top.cagtalog.nav and add your cms block instead.

Remove Top Menu :

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

Add your custom menu cms block:

<block class="Magento\Cms\Block\Block" name="custom.menu" after="-">
    <arguments>
        <argument name="block_id" xsi:type="string">custom-cms-menu</argument>
     </arguments>
</block>

You can move and place code inside any referenceContainer where you want to show the menu.

hope this will help.

Related Topic