Get Taxonomy Term ID by Node in Drupal 8 -
i'm trying taxonomy data particular node.
how can taxonomy term id using node object ?
drupal ver. 8.3.6
you that:
$termid = $node->get('field_yourfield')->target_id; then can load term with
term::load($termid); hope helps.
Comments
Post a Comment