#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: |
Description
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,
wp_list_pages('title_li=&sort_column=menu_order&exclude_tree=2,50,51,379');
shows page 379 and its child nodes and shows the child nodes of 51 but not 51 itself.
Changing the function to:
wp_list_pages('title_li=&sort_column=menu_order&exclude=2,50,51,379&exclude_tree=2,50,51,379');
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)
Change History (16)
#6
@
15 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).
#8
@
15 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.
#9
@
15 years ago
- Keywords has-patch added; needs-patch removed
Provided a patch that hopefully helps with your problems. Please test and report back.
#10
@
15 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
@
15 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.
Does the patch on ticket:9153 fix this problem?