Title: Adding &quot;current-class&quot; to the list item
Last modified: August 22, 2016

---

# Adding "current-class" to the list item

 *  [LeeID23](https://wordpress.org/support/users/leeid23/)
 * (@leeid23)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/adding-current-class-to-the-container/)
 * Modify line 80 of child-page-navigation.php
 * `echo "<li". ($page->ID == $post->ID ? " class='current-page'" : '') ."><a>ID)."'
   >".get_the_title($page->ID)."</a>";`
 * to get class=”current-class” on the list item element then use display:none in
   the CSS to hide it.
 * I would have added [here](https://wordpress.org/support/topic/css-class-in-currently-selected-page?replies=4)
   but the topic’s closed.

The topic ‘Adding "current-class" to the list item’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/child-page-navigation.svg)
 * [Child Page Navigation](https://wordpress.org/plugins/child-page-navigation/)
 * [Support Threads](https://wordpress.org/support/plugin/child-page-navigation/)
 * [Active Topics](https://wordpress.org/support/plugin/child-page-navigation/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/child-page-navigation/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/child-page-navigation/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [LeeID23](https://wordpress.org/support/users/leeid23/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/adding-current-class-to-the-container/)
 * Status: not resolved