I found this by trying to do the exact opposite. I want to remove the navbar tabs (to replace with drop-down menus from a modification) without removing the sub-menus when on those specific pages. I have a suspicion that we are looking at editing the same code in different ways... I hope someone can drop by here and explain it.