• Contains amazing walker class that can be easily used as a special walker in your own
    wp_nav_menu(...)

    What was however a little mystery for a while were the depths.

    Let’s say you want to only display menu from 3rd to 4th level. (classic menu with rolldowns/dropdowns, just shifted a few levels…) – now what you actually have to do is to set

    'start_depth' => 2

    and

    'depth' => 4 //(actually start_depth +2 !

    This was quite counter-intuitive, but if you think about it, it makes sense in the end…

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jave.web

    (@javeweb)

    Also you I found only RELATED 4th level are displaying, however if I set 'post_parent' => true
    it messes up the menu when displayed on 3rd level … any ideas? I guess I need something like “parent’s parent” for some levels…

    • This reply was modified 8 years, 1 month ago by jave.web.
    • This reply was modified 8 years, 1 month ago by jave.web.
    Thread Starter jave.web

    (@javeweb)

    I figured it out! For it to work properly, you need to “Select the filter:” which in PHP comes to setting filter_selection to the MENU id from which you want the tree to go ?? …

    So finally just:

    
    'filter_selection' => YOUR_MENU_ITEM_ID,
    'only_related' => true,
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Amazing walker class & the depth “issue”’ is closed to new replies.