logo

Load taxonomy detail by term id in Drupal 10

23
April

Load taxonomy detail by term id in Drupal 10
By: Anonymous | Published On: Tue, 04/23/2024 - 13:29

If you have already term then you can get all other tern detail by given term ID

$term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->load(TID);
$field_value = $term->FIELD_MACHINENAME->value;
$term_name= $term->name->value;

Need Help ?