cancel
Showing results for 
Search instead for 
Did you mean: 

How Create "home" link in category

How Create "home" link in category

Hi,

 

My magento version is 2.3,  I want to create "home" and "about" link in the category how to do that, I search few articles but it is for 2.0, I was not able to find for 2.3 version

 

https://www.marketplace.jawadditaksal.org/

 

I want that Home About then categories.

 

 

2 REPLIES 2

Re: How Create "home" link in category

Hello @parminder _singh

 

Copy the file from vendor/magento/module-theme/view/frontend/templates/html/topmenu.phtml and paste into app/design/frontend/your_vendor/your_theme/Magento_Theme/templates/html/topmenu.phtml

 

Now add the Home and About links as given below.

 

<?php $columnsLimit = $block->getColumnsLimit() ?: 0; ?>
<?php $_menu = $block->getHtml('level-top', 'submenu', $columnsLimit) ?>

<nav class="navigation" data-action="navigation">
    <ul data-mage-init='{"menu":{"responsive":true, "expanded":true, "position":{"my":"left top","at":"left bottom"}}}'>
        <li class="level0 nav-1 first level-top"><a href="/" class="level-top"><span>Home</span></a></li>
        <li class="level0 nav-1 first level-top"><a href="/about" class="level-top"><span>Category</span></a></li>
        <?= /* @escapeNotVerified */ $_menu ?>
        <?= /* @escapeNotVerified */ $block->getChildHtml() ?>
    </ul>
</nav>
If you find my answer useful, Please click Kudos & Accept as Solution.

Re: How Create "home" link in category

@Mayur Bhuva

I copied topmenu.phtml from  vendor/magento/module-theme/view/frontend/templates/html/

 

and Paste it into this app/design/frontend/your_vendor/your_theme/Magento_Theme/templates/html/

 

as when i opened frontend folder there was no folder "your_vendor" so I created  folder "your_vendor"  "your_theme" "Magento_Theme" "templates" "html" and and add code in the file topmenu.phtml and paste in the folder html

 

but it does not work, even I delete cache via putty

 

https://www.marketplace.jawadditaksal.org/

 

menu.jpg