WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Exclude page AND children of this page (3 posts)

  1. curlybracket
    Member
    Posted 3 years ago #

    Hi,

    I am confused. I am using the following code in a custom sidebar :

    wp_list_pages('exclude=233&title_li=');

    However, the children of the page with the id 233 still get listed.

    Is this the expected behaviour? The codex does not specify anything on this as far as i can see.

    Ah yeah, and I can't use the depth parameter, as I want the children of other pages to be displayed.

    Thanks for advice.

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    exclude_tree
    (string) Define a comma-separated list of parent Page IDs to be excluded. Use this parameter to exclude a parent and all of that parent's child Pages. So 'exclude_tree=5' would exclude the parent Page 5, and its child (all descendant) Pages. (This parameter was added with Version 2.7, and it does not function as described as of version 2.8.1 - See bug report.)

    http://codex.wordpress.org/Function_Reference/wp_list_pages

  3. curlybracket
    Member
    Posted 3 years ago #

    great! thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic