Make WordPress Core

Opened 19 years ago

Closed 19 years ago

#5469 closed defect (bug) (fixed)

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

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

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 19 years ago.
patch file

Download all attachments as: .zip

Change History (4)

#1 @ryan
19 years ago

  • Owner changed from anonymous to hailin

#2 @hailin
19 years ago

  • Status new → assigned

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

#3 @ryan
19 years ago

  • Resolution → fixed
  • Status assigned → closed

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

Note: See TracTickets for help on using tickets.