• Does anyone know if there is a way to exclude the current page using the wp-list script?

    For example, my semi custom web design page, has the “semi custom web design” link on the sidebar.

    Any help would be GREATLY appreciated.

    Here is my code:

    <?php
    $output = wp_list_pages(‘echo=0&depth=1&title_li=<h4>Main Menu</h4>’);
    if (is_page( )) {
    $page = $post->ID;
    if ($post->post_parent) {
    $page = $post->post_parent;
    }
    $children=wp_list_pages( ‘echo=0&child_of=’ . $page . ‘&title_li=’ );
    if ($children) {
    $output = wp_list_pages (‘echo=0&child_of=’ . $page . ‘&title_li=<h4>Topics</h4>’);
    }
    }
    echo $output;
    ?>

  • The topic ‘WP List Exclude ?’ is closed to new replies.