WordPress.org

Support

Support » Themes and Templates » Horizontal Page nav highlighting

Horizontal Page nav highlighting

  • i am having a horizontal page nav where i show only the first hierarchy level:
    <?php wp_list_pages(‘sort_column=menu_order&title_li=&depth=1&echo=1’); ?>

    the subnav is on the sidebar and shows up the children of the corresponding parent in the horizontal menu.

      <?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) { ?>
      <?php echo $children; ?>

    So far this works great. But it would make a lot of sense to keep the parent in the horizontal navigation highlighted while one is browsing the children. Otherwise there’s no connection betweeen the horizontal menu and the subpages. a.k.a. one doesn’t know where one started…

    Has anyone done something like that?
    Best
    Friedrich

  • The topic ‘Horizontal Page nav highlighting’ is closed to new replies.
Skip to toolbar