• 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?

    <?php

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

      <?php echo $children; ?>

    <?php } ?>

Viewing 1 replies (of 1 total)
  • Hi

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Sub Nav solution’ is closed to new replies.