Found this function and added it to the functions.php file.
if(!function_exists('get_catbynicename'))
{
function get_catbynicename($category_nicename)
{
global $wpdb;
$cat_id -= 0; // force numeric
$name = $wpdb->get_var('SELECT cat_ID FROM '.$wpdb->categories.' WHERE category_nicename="'.$category_nicename.'"');
return $name;
}
}
And then adding this code to where you want the cat title to go (based on the sidebar code):
<?php if ( function_exists('get_catbynicename') ) : else : ?>
<?php if(is_home()) {?>
<?php } ?>
<?php endif; ?>
But it doesn’t work. What am I doing wrong?
I could bypass the widget title function by using a text widget, and then placing the title in the text field. But this is a bit of a ugly hack.
Should be able to pull the current category title based on the current post. Or at least it does using the ‘<?php the_category(‘,’) ?>’ function. The php in the core category file is too complex for me too figure out so far. Preferable is not to change the core files.