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

Lionel POINTET lionel.pointet at globalis-ms.com
Thu Apr 26 14:09:07 UTC 2012


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.

Lionel

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?
>
> something like
>
> get_value ( $wp_table_name, $id_fieldname, $id_value,
> $the_field_info_to_retrieve )
>
> Example
> get_value ( "wp_term_taxonomy", "term_taxonomy_id", "parent");
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list