I'd personally get into a habit of calling get_term
or get_terms
, as the category functions are only wrapper functions that in turn call get_term(s)
anyway.
<?php
$queried_category = get_term( get_query_var('cat'), 'category' );
// echo $queried_category->term_id; // The category ID
// echo $queried_category->slug; // The category slug
// echo $queried_category->name; // The category name
// echo $queried_category->description; // The category description
?>
Familiaring yourself with the term functions will make dealing with custom taxonomies a little easier, because you'll be calling on these functions in such cases.
http://codex.wordpress.org/Function_Reference/get_term
http://codex.wordpress.org/Function_Reference/get_terms
And a function that i don't see used a great deal, but can be really handy.
http://codex.wordpress.org/Function_Reference/get_term_by
Which provides a means of fetching a term object based on name, slug or ID.