Can you show the actual code? There's a chance that there is something wrong with the values sent to the function.
–
tollmanzAug 28 '11 at 14:23

This is the actual code, I've change the term names to something generic, however in my test I would just copy-paste the line from functions.php to header.php and it would just work.
–
AndreiAug 28 '11 at 15:01

1 Answer
1

This is probably happening because the taxonomy you're trying to query is registered yet. Eg. The WordPress environment is loaded when a theme's functions.php file loads, but many plugins/themes/core functions don't register taxonomies until later.

Try hooking into init with a really high priority number and running the get_term_by function. Like so: