• Hi

    I have searched and tried various plugins and snippets to create a nav in my page.php template that shows the child pages, *siblings* and parent pages… not sure my terminology is right there… but my problem is trying to exclude the current page from the this is what I’ve got so far:

    I’m using breadcrumb nav-xt plugin and a wp_list_pages

    <li>
    <?php if (class_exists('bcn_breadcrumb'))
    {
    // New breadcrumb object
    $mybreadcrumb = new bcn_breadcrumb;
    // Assemble the breadcrumb
    $mybreadcrumb->assemble();
    // Display the breadcrumb
    $mybreadcrumb->display();
    } ?>
    </li>
    </div>
    
    <?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 } ?>

    I have read http://codex.ww.wp.xz.cn/Template_Tags/wp_list_pages

    and found

    <?php
    wp_list_pages('exclude=17,38' ); ?>

    but cant figure out where to put the exclude and/or how to exclude the *current* page in the wp_list_pages

    if that makes any sense, please help me out?

    thank you

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

    (@diss0nance)

    ok…

    figured out how to do it with CSS (sort of) using:

    #divname .current_page_item a, .current_page_item ul li, #home .on {
    	display:none;
    }

    but it would be cool if the wp_list_pages documentation included more information for “exclude”

    Thread Starter diss0nance

    (@diss0nance)

    ok dumped all the code I posted first… and now I’m using the sub pages plugin… but it doesnt show all child pages when on a child page

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

The topic ‘wp_list_page – exclude current page’ is closed to new replies.