[wp-trac] [WordPress Trac] #29839: Enhance get_terms to return only bottom child terms (terms without children) when taxonomy is heirarchical

WordPress Trac noreply at wordpress.org
Thu Oct 30 01:53:23 UTC 2014


#29839: Enhance get_terms to return only bottom child terms (terms without
children) when taxonomy is heirarchical
----------------------------------------+------------------------------
 Reporter:  theMikeD                    |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Taxonomy                    |     Version:  4.0
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------

Comment (by theMikeD):

 Replying to [comment:5 McGuive7]:
 > Hey theMikeD,
 >
 > I'm curious about this as well. Can you clarify what you mean by "only
 bottom level terms"? Say you've the following terms
 > {{{
 > - Term 1
 > - Term 2
 > - - Term 1a
 > - - Term 1b
 > }}}
 >
 > Based on your description, it seems like it could return one of two
 things:
 >
 > 1. All terms with no children, which would be: `Term 1, Term 1a, and
 Term 1b`.

 This.


 > 2. Just top-level terms with no children: `Term 1`

 Not this.

 > Are you thinking that it would do one or both (or something else
 entirely)? What's the use case for this?

 My use case is with an hierarchical taxonomy and showing a different page
 when we are at a terminal node as opposed to a node with children.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29839#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list