Create description for taxonomy term view I am after a description which is similar for all taxonomy terms based on a schools location.

So I've created a few views based on continents at http://www.explorefreediving.com/freediving-schools-in-africa and then just added a description for that view and will be doing the same for the other continents.

"Improve your snorkeling, spearfishing and freediving with one of the many schools and freediving training courses held by apnea instructors across Africa."

I am now after a similar description for every country taxonomy term which is what I use to categorise the freedive schools.

So if you click on Egypt to the right when you are looking at Africa http://www.explorefreediving.com/school-location/africa/egypt you get sent to a taxonomy term and the same with other locations too

I want to be able to insert a description for the hundreds of taxonomy term school locations (countries) without having to manually do it? The most I know I could do is set up a description in each header and use tokens but is this the right approach? If it is, how do I do that exactly? I usually have problems with tokens and using the right ones. 

If it is the right approach, doesn't that mean I will have that description across all taxonomy terms because the same view is used?
There are at least two ways to do this:

1. Views

In your views admin page, add a Global: Text area to header. Then check off Use replacement tokens from the first row. You can see the tokens (patterns) below under Replacement patterns. Your custom text my be like that:

"Improve your snorkeling, spearfishing and freediving with one of the many schools and freediving training courses held by apnea instructors across %1."

2. page--vocabulary--[machine-name].tpl.php

You could create a custom vocabulary tpl.php page and add your custom text. Details come from that answer:


Copy (and past) the page.tpl.php into your theme folder.
Rename it page--vocabulary--[machine name].tpl.php


(page--vocabulary--location.tpl.php etc.)


Open the template.php file in the theme folder and add this function:


Don't forget to change the THEME to your theme name and if you have already had the preprocess_page function in the template.php file and do not add the preprocess_page function again.

function THEME_preprocess_page(&amp;$vars) {
  if (arg(0) == 'taxonomy' &amp;&amp; arg(1) == 'term' &amp;&amp; is_numeric(arg(2))) {
    $term = taxonomy_term_load(arg(2));
    $vars['theme_hook_suggestions'][] = 'page__vocabulary__' . $term-&gt;vocabulary_machine_name;
  }
}



Open the page--vocabulary--location.tpl.php file and find that line:


(Your theme's template.php file may be different but the main structure is the same.)

 


Then add what you want:


(with your css class, spans etc.)

&lt;div class="term_description"
"Improve your snorkeling, spearfishing and freediving with one of the many schools and freediving training courses held by apnea instructors across &lt;?php print $title; ?&gt;."
&lt;/div&gt;



 - Clear all caches.