WordPress.org

Support

Support » Plugins and Hacks » Child Page Navigation » CSS class in currently selected page

CSS class in currently selected page

Viewing 3 replies - 1 through 3 (of 3 total)

Wow… by the looks of it, I broke wordpress.org’s forum lol…

Take 2:

This is doable by modifying line 80 of child-page-navigation.php

from:

echo "<li><a href='".get_permalink($page->ID)."'>".get_the_title($page->ID)."</a></li>";

to:

echo "<li><a href='".get_permalink($page->ID)."'" . ($page->ID == $post->ID ? " class='current-page'" : '') . ">".get_the_title($page->ID)."</a></li>";

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CSS class in currently selected page’ is closed to new replies.
Skip to toolbar