0

How to remove catalogue menu from frontend. I will try to xml way its working fine

<referenceContainer name="header-wrapper">
        <referenceBlock name="navigation.sections" remove="true" />
</referenceContainer>

But i need programmatically in php file

Thanks

1

Try to comment the lines for top menu code in below path

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

Editing in vendor file is a bad practice, try to override into your custom theme and comment the code which is responsible for rendering menu.

Hope this may help you!!

| improve this answer | |
  • Thank you for ur comment. let me check it. – Soundararajan m Oct 14 '19 at 6:36
  • is it working?? – jafar pinjar Oct 14 '19 at 6:56
  • yes its working – Soundararajan m Oct 14 '19 at 7:13
  • Great, Pls accept and upvote the answer, Thanks!! – jafar pinjar Oct 14 '19 at 7:14
  • already i updated as answer – Soundararajan m Oct 14 '19 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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