5

I am getting Header Links twice under the Account Links in Mobile Menu. I have attched screenshot of that. You can see in the image there is twice header links under account tab. I'm using porto theme with Magento 2.3.2.

enter image description here

Any help?

Thanks in advance...!!!

7
  • Have you find any answer? Sep 26, 2020 at 19:30
  • I have same issue if you have solution please share with me it's urgent Sep 26, 2020 at 19:34
  • @Magento : If you are using Porto as a theme then you can refer Bharat Sevra's answer. that's worked in my case. Sep 28, 2020 at 11:02
  • Yes i am using porto theme but as per Bharat Sevra's answer it also hide link in desktop view in dropdown Sep 28, 2020 at 13:26
  • @Magento : then try this: @media(max-width: 767px) { ul.header.links:first-child { display:none; } } Might be it works for you. Sep 28, 2020 at 13:41

4 Answers 4

1

Please comment <move element="top.links" destination="customer"/> in ../app/design/frontend/Smartwave/porto/Magento_Customer/layout/default.xml

http://prntscr.com/r0nvs2

1
  • It also hide navigation link like my account, Wishlist in desktop view @BharatSevra Sep 28, 2020 at 13:29
2

I just solved this issue by way of media query. Im not entirely sure what is causing the double injection of the account links, but it seems to me that it is copying the desktop version of those menu items and also adding them to the mobile menu. In order to hide those, I went ahead and added this bit of css

@media(max-width: 767px) {
    ul.header.links:first-child {
        display:none;
    }
}

this will hide the first list (with the extra fields in there) and only give you "my account" and "sign out". In my case this is all I need, but results may vary.

1
  • This is CSS will hide the default header-links when customer not logged in. Feb 11, 2020 at 10:58
0

you can start from checking where it comes from:

grep 'class="header links"' ./app/ ./vendor/ -r

grep '<!-- Account Links' ./app/ ./vendor/ -r

grep 'MENU BLOCK NAME ID' ./app/ ./vendor/ -r

and use other search variations.

there are few options:

  1. extra line in layout
  2. layout reference for links in block mixed
  3. other extension injects own menu
  4. multiple themes installed and static files deployed from them

when you install magento , go to github and create repository, push your files. every change you push to github, then you can see it in history.

0

Please comment in ../app/design/frontend/Smartwave/porto/Magento_Customer/layout/default.xml

https://prnt.sc/w7ngs3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.