[wp-trac] Re: [WordPress Trac] #9328: wp_list_pages() don't respect depth (subpage issue)

WordPress Trac wp-trac at lists.automattic.com
Sat Mar 14 03:52:24 GMT 2009


#9328: wp_list_pages() don't respect depth (subpage issue)
--------------------------+-------------------------------------------------
 Reporter:  LadyAnna      |       Owner:  anonymous                       
     Type:  defect (bug)  |      Status:  new                             
 Priority:  normal        |   Milestone:  2.7.2                           
Component:  General       |     Version:  2.7.1                           
 Severity:  normal        |    Keywords:  pages, subpages, wp_list_pages()
--------------------------+-------------------------------------------------

Comment(by zeronex):

 Replying to [ticket:9328 LadyAnna]:
 > On my blog, I tried making the theme handle the pages as don't show
 subpages in list (they are listed on the parent page). I used the
 parameter depth=1, as instructed in the codex, still my subpages are
 shown.
 >
 > I tried to use the default wp_list_page() with no parameters, and
 basically the only visual difference was that the title (Pages) was
 unformatted, the actual list of pages looked the same. The default use of
 the tag, according to codex, should be that subpages get indented one step
 from its parent. This does not happen (not for the default theme either so
 I'm pretty sure it's not a theme thing).
 >
 > For some reason it seems that subpages are treated exactly as a mainpage
 when listing.

 Tested on 2.8 with
 print_r(wp_list_pages('depth=1&title_li'));
 Only shows top level pages, seems to be working fine

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9328#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list