Does anybody know how to display the name of the current child category as title in category and single view (outside the loop)?
To display the current category name I use following code:
<?php
global $post;
$my_cat_name = $wpdb->get_var("SELECT cat_name FROM $wpdb->categories, $wpdb->post2cat WHERE cat_ID = category_id AND post_id = $post->ID");
echo strip_tags($my_cat_name);
?>
Thanks for any help, Evita