Skip to main content
Share Your Experience: Take the 2024 Developer Survey
25 votes
Accepted

Magento 2 Navigation Menu not showing

Solution 1 : You need to have all your categories UNDER the "Default Category". Then they should show. Solution 2 : Verify that Default Category Is Active (Enable category = "yes") and "Include ...
Manthan Dave's user avatar
  • 9,826
13 votes

Magento 2 : How to display the category image in the topmenu

Look at vendor/magento/module-catalog/etc/di.xml <type name="Magento\Theme\Block\Html\Topmenu"> <plugin name="catalogTopmenu" type="Magento\Catalog\Plugin\Block\Topmenu" /> </...
Khoa TruongDinh's user avatar
11 votes

Magento 2: Top Nav Menu is not appearing in Home Page

Take a look to this issue: https://github.com/magento/magento2/issues/3421 Summary: In some cases when Varnish Cache is activated, due to a Magento 2 and Varnish issue, the navigation menu can ...
Javier Rojano's user avatar
10 votes

Magento 2 : Missing Account Links in Mobile Menu

This happened to me when I made a custom theme. I created a theme.js file in app/design/fontend/<CUSTOM_THEME>/default/web/js/ to use some library I added. But I forgot to copy the code that ...
Cladiuss's user avatar
  • 1,277
9 votes
Accepted

Magento 2: Top Nav Menu is not appearing in Home Page

After following major tutorials and troubleshooting web pages it turned out the issue lies with my hosting configuration. Varnish Cache seems to be the cause of the menu disappearing. Disabling ...
Mohammed Joraid's user avatar
7 votes

Mobile menu breakpoint in Magento 2

The JS for the menu that has that functionality can be found in lib/web/mage/menu.js First create the folder structure in your theme ex: [Namespace]/[theme_name]/web/mage/ And copy menu.js ...
MHK Developer's user avatar
7 votes
Accepted

Magento : disable cache for static block

Judging by your admin screenshot, is there any reason you are using two FPCs? Lesti_FPC and Evolved Caching? Normally only one FPC is needed, and judging by Evolved caching documents it has more ...
B00MER's user avatar
  • 8,307
7 votes
Accepted

UI library less override

The solution is to add app/design/frontend/{Vendor}/{Theme}/web/css/source/lib/_navigation.less
Lorenzo's user avatar
  • 648
7 votes
Accepted

Open Admin Menu Item in New Tab

Yes, there is a way. I didn't know it is that easy. I just tried it myself and it is working. Just use target="_blank" in xml like this: <add id="Vendor_Module::id" title="Menu title"...
Shoaib Munir's user avatar
  • 9,482
6 votes

How to get list of pages in Magento 2

For your information, even though the answers posted look like valid answer, it is recommended to use service contracts in Magento 2. In your case a valid code would be to first inject the right ...
Raphael at Digital Pianism's user avatar
6 votes
Accepted

How to open up Magento 2 mobile menu from top

@media="screen and (max-width: 767px){ .nav-sections { background: #eee; -webkit-transition: top 0.3s; -moz-transition: top 0.3s; -ms-transition:...
Dipesh Rangani's user avatar
6 votes
Accepted

Magento 2 getIncludeInMenu returns Null

The problem The call to getIncludeInMenu returns NULL because the value is not part of the collection. Basically, you get your child categories by calling getChildrenCategories. The details of that ...
Raphael at Digital Pianism's user avatar
6 votes
Accepted

how to add and customize items in menu/nav bar in header

1) To remove sign up and sign in links edit your default.xml code at below location. /app/design/frontend/Infortis/base/Magento_Theme/layout/default.xml Add these lines of code <referenceBlock ...
Manoj Deswal's user avatar
  • 5,805
6 votes
Accepted

How to add a category in main menu in magento 2

Login to Admin: Step 1) Click on Catalog >> Categories. Step 2) Select Category you want to add in main menu. And select "Include in Menu" => Yes Step 3) Run command php bin/magento cache:...
Kirti Nariya's user avatar
  • 3,041
6 votes
Accepted

How to create menu section title in adminhtml?

please update your menu.xml like below: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:...
Rutvee Sojitra's user avatar
6 votes

Problem with link in responsive menu (go to undefinied url)

If anyone has this issue, my problem was that I have a custom menu and the file menu.js of magento looks for .ui-menu-item class (so basicaly I've added this class to my menu items)
Morgan Tartreau's user avatar
6 votes
Accepted

How to add new custom sub menu in Sales Admin Menu?

Add menu.xml inside Vendor/Module/etc/adminhtml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:...
Natha Odedara's user avatar
5 votes
Accepted

Magento 2 How to remove menu item in admin portal?

By using remove tag you can remove a menu item from admin menu. Syntax should be <remove id="MENU_ITEM_ID" /> Suppose I want to remove Cms page section from menu, then I have to rewrite ...
Amit Bera's user avatar
  • 77.5k
5 votes
Accepted

How to use Customer Account menu on custom page

Self-answer, thanks for being my rubber duckie: In the my_invoices_invoices_index.xml file, inside the node, I added the following: <update handle="customer_account"/> and it includes the ...
Brad Fellows's user avatar
5 votes
Accepted

Magento 2 default menu call in phtml

If you want Top Menu in CMS Page then you can use below code in CMS Page. {{block class="Magento\Theme\Block\Html\Topmenu" template="Magento_Theme::html/topmenu.phtml"}} But as you mention you want ...
Kul's user avatar
  • 1,787
5 votes
Accepted

Mobile menu breakpoint in Magento 2

You have to replace style in web\css\source _navigation.less in your custom theme. For Desktop .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) { to (your custom ...
Dipesh Rangani's user avatar
5 votes

What should the action attribute in menu.xml be?

the action part of the menu is the actual url of the menu item. It should be module/controller/action or module/controller if the action is index. take a look at this example from the core for the cms ...
Marius's user avatar
  • 198k
5 votes

Magento 2 Navigation Menu not showing

If you have tried all the other solutions and checked all the other basic things (enabled, correct root category...) then I might have the solution for you! If the category was every removed from the ...
craig.tadlock's user avatar
5 votes
Accepted

Change Customer Account Sidebar Menu Navigation Title

The reason why it's not working is because it's getting overwritten in the luma theme. If you want to change that, create a theme that extends the luma theme and change it there. Check the file ...
drew7721's user avatar
  • 838
5 votes
Accepted

Re-direct Category Menu item to different URL

You can do this by adding a record in URL Rewrites In admin goto Marketing -> URL Rewrites add new URL rewrite by clicking Add URL Rewrite Create URL Rewrite Dropdown Select Custom Store Select ...
Rakesh Varma's user avatar
  • 2,226
4 votes
Accepted

Magento 2: How to add a link to Stores->Configuration

You can use action="adminhtml/system_config/edit/section/YOUR_SECTION_NAME"
Keyur Shah's user avatar
  • 18.1k
4 votes
Accepted

What should the action attribute in menu.xml be?

Let's say you have the following: In your etc/adminhtml/routes.xml you declare the following route name: <route id="hello" frontName="hello"> <module name="Vendor_Module" /> </...
Raphael at Digital Pianism's user avatar
4 votes

Magento : disable cache for static block

that worked for me magento 1.9.2.3, tried for cms_menu cms block (file app/design/frontend/rwd/default/layout/cms.xml) <cms_menu> <reference name="left_first"> <block type="...
Konstantin Gerasimov's user avatar
4 votes
Accepted

Magento 2 - top menu show from 2nd sub category

Let's create a new module. We'll call it StackExchange_Topmenu. you will need the following files. app/code/StackExchange/Topmenu/registration.php - the registration file <?php \Magento\...
Marius's user avatar
  • 198k
4 votes
Accepted

add a link separator or a small icon between the categories in main menu

You can do this using css. I don't have access to ultimo on Magento 2 but I guess it's pretty much like Magento 1.x in which case it would be something like: .nav-regular li.level0 > a::after {...
jscar's user avatar
  • 787

Only top scored, non community-wiki answers of a minimum length are eligible