Forums

Multi-Level navigation menus (2 posts)

  1. dennymathews
    Member
    Posted 3 years ago #

    Hi ~

    I'm using a free theme where I want to implement the drop-down child menus in the nav bar. I've tried the following code to display the child pages as a drop-down but it doesn't work.

    <?php
      if($post->post_parent)
      $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
      else
      $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
      if ($children) { ?>
      <ul>
      <?php echo $children; ?>
      </ul>
      <?php } ?>

    I don't know if my CSS is the problem or maybe the PHP code. Can someone help me?

  2. sbiehle
    Member
    Posted 3 years ago #

    Have you tried using the CSS on Darren Hoyt's example of this?

Topic Closed

This topic has been closed to new replies.

About this Topic