From my notes, this should help:
<?php
$term_id='';
if ( is_tag() ) {
$term_id = get_query_var('tag_id');
$taxonomy = 'post_tag';
$title = 'Tag: ';
}
if ( is_category() ) {
$term_id = get_query_var('cat');
$taxonomy = 'category';
$title = 'Category: ';
}
if ($term_id) {
$args ='include=' . $term_id;
$terms = get_terms( $taxonomy, $args );
if ($terms) {
foreach($terms as $term) {
if ($term->count > 0) {
echo '<p>' . $title . '<a href="' . get_term_link( $term->term_id, $taxonomy ) . '" title="' . sprintf( __( "View all posts in %s" ), $term->name ) . '" ' . '>' . $term->name.'</a> has ' . $term->count . ' post(s). </p> ';
}
}
}
}
?>
ummm…. okay. shoot man, I really don’t know php well enough to make even a dent in that. Why would I need that much code just to show the description of a tag? All I want to do is slap the description of the tag on its page, if the description exists.
I just tried slapping that code exacting in the template and it just kills the page – stops loading completely when that code strikes.
Well, I’ll be dammed… here it is:
<?php echo tag_description(); ?>
I just needed the “echo” in there. Thanks for the kick in the right direction.