[wp-hackers] seeking a built-in wp function that does..

Andrew Nacin wp at andrewnacin.com
Fri Apr 27 05:53:35 UTC 2012

2012/4/19 Haluk Karamete <halukkaramete at gmail.com>

> Is there a built in wordpress function that let's me look up the
> "parent" field of the "wp_term_taxonomy" table if I pass the TT_ID to
> it?

On Thu, Apr 26, 2012 at 10:09 AM, Lionel POINTET <
lionel.pointet at globalis-ms.com> wrote:

> Hi Haluk,
> Doing this: $term = get_term($term_id, $taxonomy);
> And then $term->parent, you get its parent.
> But it's with the term_id, you should never access the term_taxonomy_id
> since it's only a "link" ID.

Right, term_taxonomy_id is purely internal. No APIs expose it as a function
argument. That is why you always need to pass $term_id *and* $taxonomy (or
a $term object) to most functions.


More information about the wp-hackers mailing list