Title: list_pages Question
Last modified: August 19, 2016

---

# list_pages Question

 *  Resolved [xsk8](https://wordpress.org/support/users/xsk8/)
 * (@xsk8)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/list_pages-question/)
 * 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](https://wordpress.org/support/users/xsk8/)
 * (@xsk8)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/list_pages-question/#post-1403486)
 * no idea?
 *  Thread Starter [xsk8](https://wordpress.org/support/users/xsk8/)
 * (@xsk8)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/list_pages-question/#post-1403487)
 * 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.

## Tags

 * [class](https://wordpress.org/support/topic-tag/class/)
 * [current page](https://wordpress.org/support/topic-tag/current-page/)
 * [id](https://wordpress.org/support/topic-tag/id/)
 * [list_pages](https://wordpress.org/support/topic-tag/list_pages/)
 * [navigation](https://wordpress.org/support/topic-tag/navigation/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [xsk8](https://wordpress.org/support/users/xsk8/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/list_pages-question/#post-1403487)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
