Forums

[resolved] In wp_list_pages/wp_list_categories, does 'exclude' apply to children? (2 posts)

  1. Trahald
    Member
    Posted 3 years ago #

    In wp_list_pages() and wp_list_categories, does the 'exclude' argument apply to all child pages and cats and the page/category being excluded?

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    With the template tag, wp_list_pages(), you need to use the exclude_tree argument.

    With the template tag, wp_list_categories(), the exclude= argument with the parent category id excludes the children but that assumes you adhere to to the standard, that ANY category that has been designated a Parent category is not meant to be checked in the category hierarchy when writing posts. Meaning, only the latest generation category should be checked. Think of it like this, only the youngest generation gets the action.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.