[wp-trac] [WordPress Trac] #4948: Category Parent/Child Tree

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 31 19:21:04 UTC 2012


#4948: Category Parent/Child Tree
-------------------------+-----------------------------
 Reporter:  iacas        |       Owner:  anonymous
     Type:  enhancement  |      Status:  closed
 Priority:  low          |   Milestone:  Future Release
Component:  Taxonomy     |     Version:  2.2.3
 Severity:  minor        |  Resolution:  worksforme
 Keywords:               |
-------------------------+-----------------------------
Changes (by wonderboymusic):

 * keywords:  needs-patch =>
 * status:  new => closed
 * resolution:   => worksforme


Comment:

 Use this:

 {{{
 $tree = get_terms( 'category', array(
    'get'      => 'all',
    'orderby'  => 'id',
    'fields'   => 'id=>parent'
 ) );
 }}}

 You can pass {{{'slug' => 'my-slug'}}} for context

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


More information about the wp-trac mailing list