Ticket #5469 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

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

Reported by: fitztrev Assigned to: hailin
Priority: normal Milestone: 2.5
Component: General Version:
Severity: normal Keywords:
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

5469_walk_cleanup.diff (2.8 kB) - added by hailin on 12/16/07 03:48:17.
patch file

Change History

12/15/07 17:55:59 changed by ryan

  • owner changed from anonymous to hailin.

12/16/07 03:48:17 changed by hailin

  • attachment 5469_walk_cleanup.diff added.

patch file

12/16/07 03:50:30 changed by hailin

  • status changed from new to assigned.

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

12/16/07 20:31:44 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

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