I am trying to build a node file for a content type in Drupal 7.59. I have for example a field for a taxonomy term. There is only 2 terms Expert and Guest. I want to display something on the node if this term reference choice is marked as Expert.
So I need to figure out how to write a line that checks for the value of the taxonomy term and then if it matches expert then it displays something but if it is guest it doesn't.
The field I have setup in my content type is:
- Name of field: author type
- Machine Name: field_author_type
- Field Type: Term reference
The root taxonomy term is Author Type and the two terms are Expert and Guest. Does anyone know how to accomplish this? I hovered over the taxonomy term I wanted to reference and it was /taxonomy/term/57/ Is 57 the actual number or do I find it elsewhere?
So far I have this which is not much and it doesn't work so it is wrong. I am really sucky at php.
<?php if ($content['field_authors_type']->taxonomy[57]): ?>
Put what you want to display here
<?php endif; ?>