Sub Nav solution (2 posts)

  1. Jeff Kinley
    Posted 2 years ago #

    Hi, I am looking for a simple way to have a sidebar nav in sidebar.php. I want the nav to list the top level pages for the page 'services'. Then you have a list of top level services. If you click on one of those links then the list shows the children of that category but not the children of the other top level parents. This code seems to work, but I can't believe it. Any other ideas?


    $children = wp_list_pages('title_li=&child_of=11&echo=0');
    if ($children) { ?>

      <?php echo $children; ?>

    <?php } ?>

  2. blacklinemedia
    Posted 2 years ago #


    Unless you are creating a plugin, I would simply advice creating a new custom menu, and then using the default wordpress Menu Widget to display it, in your sidebar.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.