How to print a taxonomy term's field value alongside a Views grouping header? In Drupal 8.4.4 I have a "Living Things" taxonomy vocabulary. One field on the terms in the vocabulary is "Most Common Name", with machine name field_most_common_name. On my "Animalia" term its value would be "Animal".

In Views, I have a "Taxon Media" view which lists media related to the taxonomy term. I display it in a block on the taxonomy term's pages themselves (not on nodes). In the view I group media by another field, "Primary Taxon", which is a reference to the term. It prints on the page as the grouping heading (e.g. "Animalia").

How can I print the value of my "Most Common Name" field next to that title? i.e. "Animalia Animal".

I have made a template, views-view-grouping--taxon-media.html.twig, cloned from the one in the Classy template, tested that works, then added the 4th line and tried a few other things such as content.field_most_common_name, but cannot get the field's value to display:

&lt;div class="view-grouping"&gt;
  &lt;div class="view-grouping-header"&gt;
    {{ title }}
    {{ field_most_common_name }}
  &lt;/div&gt;
  &lt;div class="view-grouping-content"&gt;{{ content }}&lt;/div&gt;
&lt;/div&gt;
Thanks to Mario's helpful hint in the first comment, I was able to do this in the View and not in the twig template:


In the FIELDS section of the View, add "Most Common Name" as a field.
Select "Exclude from display", because I only want it in the title, not the results themselves.
(3. Select "Link to the Taxonomy term", because I want it to be a link.)
Next to "FIELDS", under the "Add" drop-down menu, choose "Rearrange".
Drag "(field_primary_taxon: Taxonomy term) Taxonomy term: Most Common Name" above "Media: Primary Taxon" > Apply
Click "Media: Primary Taxon [hidden]" field
Check "Override the output of this field with custom text"
REWRITE RESULTS > and copy the required tokens from the "REPLACEMENT PATTERNS" list, and paste into the "Text" area. I also inserted brackets outside of those tokens, so my Text area looks like this:

{{ field_primary_taxon }}
(
{{ field_most_common_name }}
)
Apply > Save > Clear all caches if necessary > Refresh the page.
Title now in my example is "Animalia (Animal)". "Animalia" and "Animal" are links to the taxonomy page.