How to hide the submenu subcategories from header menu in Opencart?

Some users have said that you can set order “-1” for a subcategory in admin panel but it didn’t worked for me.

So I had to tweak the code from: catalog > view > theme > default > template > common > header.tpl. (all this if you use the default opencart theme).

Edit from:

1
2
<nav id="menu" class="navbar">
<div class="navbar-header"><span id="category" class="visible-xs"><?php echo $text_category; ?></span>

Backup your file and start to delete lines. Requires some HTML knowledge.

opencart

ADD A COMMENT: