[wp-hackers] categories with no childs
Charles K. Clarkson
cclarkson at htcomp.net
Sat May 29 23:17:43 UTC 2010
Dion Hulse (dd32) wrote:
: capsx wrote:
: : which is the easiest way to get wordpress categories with no child
: : categories?
: $terms_Without_children = get_terms('category', array('hide_empty' => false,
: 'parent' => '0', 'exclude' => $terms_with_children ));
: // Fetch terms with a Parent of 0 (ie. top level), which are not in
: the list of terms with known children
That looks like a better solution, but what about child categories
(not top level) which have no child categories? Why the top level
category restriction?
Charles Clarkson
--
Mobile Home Investor
Free Market Advocate
Programmer
I'm not really a smart person. I just play one on the Internet.
Stephenville, TX
+1 (254) 968-8328
More information about the wp-hackers
mailing list