How to add a taxonomy term value as a class on the taxonomy term field in Drupal 8 and Drupal 9

In Drupal 8/9, use the hook_preprocess_field() function to add a taxonomy term value as a class on the taxonomy term field in the .theme file.
copy-icon

Comments

Authors

Read Next