[wp-trac] [WordPress Trac] #5708: wp_list_pages() will not list subpages by ID if the parent is not included.

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 22 16:06:39 GMT 2008


#5708: wp_list_pages() will not list subpages by ID if the parent is not included.
--------------------------+-------------------------------------------------
 Reporter:  chippeterson  |       Owner:  anonymous    
     Type:  defect        |      Status:  new          
 Priority:  normal        |   Milestone:  2.7          
Component:  General       |     Version:  2.3          
 Severity:  normal        |    Keywords:  list subpages
--------------------------+-------------------------------------------------
 Here is a simple example.

 If the parent of page 23 is not in the list the page 23 will not pe
 displayed. Here is the code, I tested 5 times:

 <?php
 wp_list_pages('include=5,9,13,23&title_li=<h2>' . __('Poetry') . '</h2>'
 ); ?>

 This will display all 4 pages because 13 is a parent of 23.

 <?php
 wp_list_pages('include=5,9,23&title_li=<h2>' . __('Poetry') . '</h2>' );
 ?>

 This will display only 5 and 9 because 13, the parent of 23, is not in the
 list.

 So, you can not list subpages if their parent is not in the list.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5708>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list