Another Level 3 Problem?
-
Seem to be getting the same problem as the last person with a Level 3 problem. I have 3 separate calls to wp_nav_menu for the 3 different levels of navigation the site will have. Need to call this 3 times for the design our guy came up with. Here is an example hierarchy:
- Running your organisation
- Knowledge hub
- Finance & business management
- Trustees, boards & committees
- […]
- Funding
- Funding child page one
- Funding child page two
- Services & deals
- […]
- Setting up a charity
- Where next?
- Write your constitution
- Decide on a structure
- […]
- News, campaigns & events
- Employment initiatives
When I’m at the top level, everything looks fine. When I am in “Running your organisation” I see the correct second level menu but I also see the 3rd level menu for “Knowledge hub”. In fact it doesn’t matter what 2nd level page in “Running your organisation” I am in, I always see the 3rd level menu for “Knowledge hub”. Even when I am in “Funding” and I would expect to see my 2 temporary child pages.
Here is how I am calling the function:
<?php wp_nav_menu( array( 'theme_location'=>'primary', 'level'=>'1', 'depth'=>'1', 'container'=>false ) ); ?> ... <?php wp_nav_menu( array( 'theme_location'=>'primary', 'level'=>'2', 'depth'=>'1', 'container'=>false ) ); ?> ... <?php wp_nav_menu( array( 'theme_location'=>'primary', 'level'=>'3', 'depth'=>'1', 'container'=>false ) ); ?>
Am I doing something wrong here?
Despite all this, props to you for your plugin. New to WordPress theme development and getting my head round making my own Custom Walker didn’t seem fun so your solution looks like the right choice!
Thanks in advance,
Matthew
- The topic ‘Another Level 3 Problem?’ is closed to new replies.