Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#8683 closed defect (bug) (duplicate)

exclude_tree in wp_list_pages not working consistently

Reported by: jayp Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: Template Keywords: has-patch needs-testing reporter-feedback
Focuses: Cc:


The exlcude_tree parameter in the template tag wp_list_pages is not working reliably for me. I have a situation with pages and child pages, and when using the following,


shows page 379 and its child nodes and shows the child nodes of 51 but not 51 itself.

Changing the function to:


Then hides 379 but not its child nodes. The child nodes of 51 also remain visible.

I've moved 379 and 51 to various levels in the pages hierachy. I've set their status to draft and then published them again. Nothing makes a difference.

I'm terribly sorry I can't be more specific for the conditions that are causing the bug. I am happy to allow someone to look at the database and site if need be.

Attachments (1)

8683.patch (1.6 KB) - added by hakre 7 years ago.

Download all attachments as: .zip

Change History (16)

#1 @jayp
7 years ago

  • Milestone changed from 2.8 to 2.7.1

#2 @MichaelH
7 years ago

Does the patch on ticket:9153 fix this problem?

#3 @Denis-de-Bernardy
7 years ago

I think this one is actually related to #9580

#4 @Denis-de-Bernardy
7 years ago

  • Component changed from General to Template
  • Keywords needs-patch added

#5 @hakre
7 years ago

  • Keywords reporter-feedback added

#6 @hakre
7 years ago

The exlcude_tree parameter in the template tag wp_list_pages is not working in 2.7 and 2.7.1. It needs a patch. You should be able to use it with a single value and not with a list and that's it (if even so).

#7 @hakre
7 years ago

seee #9153 (for wp 2.8)

#8 @hakre
7 years ago

Your overall description is very clear. I will create a patch for the situation you describe (will take some minutes). Please be so kind and test it aftwards, thanks.

7 years ago

#9 @hakre
7 years ago

  • Keywords has-patch added; needs-patch removed

Provided a patch that hopefully helps with your problems. Please test and report back.

#10 @Denis-de-Bernardy
7 years ago

is this current in trunk, or only in 2.7? if the later, we might as well close as wontfix. else, we might want to move this to the 2.8 milestone.

#11 @Denis-de-Bernardy
7 years ago

  • Milestone changed from 2.7.2 to 2.8

moving to 2.8. close as wontfix or invalid if it no longer applies in there.

#12 @Denis-de-Bernardy
7 years ago

  • Keywords needs-testing added

#13 @Denis-de-Bernardy
6 years ago

  • Milestone changed from 2.8 to 2.9

#14 @azaozz
6 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Think this is mostly a dupe of #9153

#15 @lloydbudd
6 years ago

  • Milestone 2.9 deleted
Note: See TracTickets for help on using tickets.