Can’t get it to work?
-
Hello,
This is a great idea! However, I am having trouble getting it to work. I can confirm that my menu code works fine without your custom attributes. But, when I add ‘level’ and ‘child_of’ nothing shows up.
One potential issue is that I am not sure of the syntax for the integer option for ‘child_of’ — at first I assumed it was the Post ID of the menu item page… but then realized it needed to be the Menu ID. So I inspected the full menu and found the ID and ended up with this:
wp_nav_menu( array( 'container' => '', 'theme_location' => 'menu-main', 'level' => 3, 'child_of' => 10455, ) );
But, that didn’t work, so I tried the menu title:
wp_nav_menu( array( 'container' => '', 'theme_location' => 'menu-main', 'level' => 3, 'child_of' => 'On Stage', ) );
But, that didn’t work either. I’ve tried removing ‘level’ and also changing the value of ‘level’ to 1.
What am I missing? Thank you.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can’t get it to work?’ is closed to new replies.