I am trying to target a specific div with CSS. But for that, I need a unique class in order to target a specific taxonomy term. I look at this question, but that doesn't work as it will target all taxonomy terms.
I have created a vocabulary
called 'Titles' which has the following terms in it:
Which will display the following in my browser:
Note that I am not using a view to display these titles. Instead, I used a preprocess function:
function MYTHEME_preprocess_node(&$variables) {
$variables['authortitle'] = \Drupal::entityTypeManager()->getViewBuilder('user')->view($variables['node']->getOwner(), 'nodetitle');
}