[support] How do I get the taxonomy id from a node

Fred Jones fredthejonester at gmail.com
Mon Oct 22 13:40:58 UTC 2007


sander-martijn wrote:
> I've never needed to do this so i'm not exactly sure - but have you tried
> print_r($node->taxonomy);
> that will often answer the question.

Yes, precisely. You will see that $node->taxonomy is an array, and in 
there are taxonomy term ids, but note that each node can have multiple 
taxonomy terms. You can use that array however you want, however. :)

>> I get the array and assign the same to my new node, it works, but how do 
>> retrieve the taxonomy id from the $node->taxonomy?




More information about the support mailing list