how to highlight child nav link? (1 post)

  1. joyceliu6
    Posted 3 years ago #

    I'm having a side bar navigation menu -replicate of the main navigation menu
    How can I get the child nav link highlighted when I'm on a child page.
    Here is what I've go so far

    <div class="menu_side">
      if($post->post_parent) {
      $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
      $titlenamer = get_the_title($post->post_parent);
      else {
      $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
      $titlenamer = get_the_title($post->ID);
      if ($children) { ?>
    <li id="menu_sideheading"><?php echo $titlenamer; ?></li>
      <li><?php echo $children; ?></li>
    <?php } ?>

    Help! Please

    [ Please do not bump, that's not permitted here. ]

Topic Closed

This topic has been closed to new replies.

About this Topic