• Resolved xsk8

    (@xsk8)


    Hi everybody, I’m using wp function list_pages to show an additional navigation for a specific page and its children.
    I’m using the code as follows:

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

    Does anyone knows how to get an ID or Class to the link results of the statement to indicate the current page via css?

    Any hint would be appreciated!!! THX !!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter xsk8

    (@xsk8)

    no idea?

    Thread Starter xsk8

    (@xsk8)

    sorry i found out: this class is set by default… I’m blind… ??

    When wp_list_pages() is called while displaying a Page, the list item for that Page is given the additional class current_page_item.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘list_pages Question’ is closed to new replies.