• Resolved vectyr

    (@vectyr)


    Ok this sounds like it should be basic but I can’t seem to find a solution. I’m currently using wp_page_menu to show dropdown menus on my site. But I would only like to show the children of the main items only, so no grandchildren or great-grandchildren or third cousins twice removed.

    I don’t know if there’s an easy way to do this. One solution is to have the wp_page_menu only show a certain category and then put all the pages I want to show in that category. Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter vectyr

    (@vectyr)

    Crap, scratch the categories idea, nevermind on that. But hiding grandchildren…hmmm.

    Thread Starter vectyr

    (@vectyr)

    <?php wp_page_menu(‘depth=2’) ?>

    There’s the solution. “depth=2” will only show the main menu items and their immediate children.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_page_menu and hiding grandchildren’ is closed to new replies.