Support » Fixing WordPress » Highlight current page in List of childpages

  • Resolved rezer5

    (@rezer5)


    Hello, i found a codesnippet which was the one i was looking for. It lists the childpages of the current motherpage.

    <?php if ( is_page() ) { ?>
    <?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 } } ?>

    But one thing is missing. It doesnt highlights the current page. Can anybody help me to resolve the problem?!? I’ve tried to fix it, but i dont know how 🙁 .

    Greetings rezer

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Highlight current page in List of childpages’ is closed to new replies.