[wp-trac] [WordPress Trac] #11162: Order in wp_list_categories

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 17 13:48:05 UTC 2009


#11162: Order in wp_list_categories
-----------------------------+----------------------------------------------
 Reporter:  bi0xid           |        Owner:            
     Type:  enhancement      |       Status:  closed    
 Priority:  low              |    Milestone:            
Component:  General          |      Version:            
 Severity:  minor            |   Resolution:  worksforme
 Keywords:  list categories  |  
-----------------------------+----------------------------------------------
Changes (by scribu):

  * status:  new => closed
  * type:  task (blessed) => enhancement
  * version:  2.9 =>
  * resolution:  => worksforme
  * milestone:  2.9 =>


Comment:

 Currently, passing a list of arguments to 'include' simply retrieves that
 set of categories, regardless of their hierarchy.

 So here are the problems with your proposal:

 1) What if I don't want to order by those IDs, just simply include them?

 2) The hierarchy would be broken

 Even if those problems were resolved, the implementation would still boil
 down to this:

 {{{
 <?php
   foreach ( array(84, 23, 174, 175) as $id )
     wp_list_categories("show_count=&title_li=&include=$id");
 ?>
 }}}

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


More information about the wp-trac mailing list