php - What's the difference between term_id, term_taxonomy_id and cat_ID? -


i'm working on plugin , there need cat_id. used function, get_the_terms( $id,'category' ); , getting array this:

  array   (      [10] => stdclass object          (             [term_id] => 10             [name] => personal             [slug] => personal             [term_group] => 0             [term_taxonomy_id] => 10             [taxonomy] => category             [description] =>              [parent] => 0             [count] => 3             [object_id] => 1             [filter] => raw         )   ) 

there should cat_id can't find any.

it seems term_taxonomy_id , term_id showing i'd expect see in cat_id, somehow came know term_id different term_taxonomy_id.

for example, if delete category , create another, term_id not equal cat_id, it?

is safe use term_taxonomy_id cat_id? what's difference between them all?

term_id , cat_id have same value. aren't seeing category specific properties because you've used get_the_terms() instead of get_the_category().

change get_the_category( $id );


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -