WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#8558 closed defect (bug) (wontfix)

Excluding a page from wp_list_pages doesn't exclude children

Reported by: donpaolo Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: General Keywords:
Focuses: Cc:

Description

I have a page titled "About" with ID "5" and its child "Me" with ID "6". If I write:

<?php wp_list_pages('exclude=5&title_li='); ?>

The "Me" page still shows up as a link.

wp_list_pages should exclude the children of the excluded pages, too.

It's reported in http://wordpress.org/support/topic/194657?replies=3 that this bug appeared after 2.3 version.

Change History (1)

comment:1 ryan5 years ago

  • Milestone 2.7.1 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

In 2.7 you can use exclude_tree to exclude a page and its children. exclude retains its current behavior for backward compatibility.

Note: See TracTickets for help on using tickets.