Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5469 closed defect (bug) (fixed)

wp_list_pages() creates empty <ul> tags with depth=1 argument

Reported by: fitztrev's profile fitztrev Owned by: hailin's profile hailin
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

When a page has a child page, and the user wants to display just the top level pages, this is the syntax to use:

<?php wp_list_pages('depth=1'); ?>

However, this creates pairs of "<ul></ul>"s where those children would normally be nested beneath the parents.

Attachments (1)

5469_walk_cleanup.diff (2.8 KB) - added by hailin 17 years ago.
patch file

Download all attachments as: .zip

Change History (4)

#1 @ryan
17 years ago

  • Owner changed from anonymous to hailin

@hailin
17 years ago

patch file

#2 @hailin
17 years ago

  • Status changed from new to assigned

fixed and tested on wporg and wpcom, by examining "view source".
It works correctly now.

#3 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6388]) Fix depth = 1 page traversal. Props hailin. fixes #5469

Note: See TracTickets for help on using tickets.