I want to show the current Taxnomony term name a page is on. what is the php snippet to do this?
Note you need to have a term id for this to work, details of that depend on the page you are viewing
<?php $tid = 1; $term = taxonomy_get_term($tid); print $term->name; ?>
How do I get the term ID? It should display the title for Term 1 if its in the term 1 page, and it should display term 2 if its in term 2
since i have the code just in fron of me ;)
if (arg(0)=="taxonomy" && arg(1)=="term" && is_numeric(arg(2))) { $tid = (int)arg(2); }
Comments
Given a term id (tid) this will do the trick
Note you need to have a term id for this to work, details of that depend on the page you are viewing
How do I get the term ID? It
How do I get the term ID? It should display the title for Term 1 if its in the term 1 page, and it should display term 2 if its in term 2
Here we go
since i have the code just in fron of me ;)