Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using CSS framework (Metro UI, but this is a problem in Bootstrap too). When I set parent menu, the item itself isn't clickable, it's only toggle for its submenu. I tried to change JS and CSS so it works on hover, but this solution is bad for lower resolution devices (they can't open submenus).

So I need to add current parent item as its own child, if you know, what I mean. I can do it manually by assigning duplicate menu as its own child, but it would be better this way, because I could add something like:

  1. Category
      1. Category (clickable)
    • divider -
    • 1.1 Subcategory
      • 1.1 Subcategory (clickable)
      • divider
      • 1.1.1.... etc.

Many thanks for any idea!

EDIT: So basically I am looking for something like:

if ( $item->has_children ) {

// add $item as first child, then add real children

share|improve this question
Don't know Metro UI, but this is a known issue with bootstrap, it is off topic here, but I'm certain if you search for it on the internet you'll find multiple solutions for it. – ialocin Jun 18 '14 at 9:40
I know this is known issue with Bootstrap, so I decided to solve it by adding parent as its own child (and it's not off topic, since I want to do it with WordPress code). – OndrejBakan Jun 18 '14 at 15:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.