Instead of doing: print $term->name;
you need to return $term->name;
so you can then use it for queries you could run on it.
Instead of doing: print $term->name;
you need to return $term->name;
so you can then use it for queries you could run on it.