I have this:
echo single_cat_title(''); wp_title(''); echo ' - some more keywords';
Category name is not showing in title tag, everything else does.
How should this line look like?
Thanks
I have this:
echo single_cat_title(''); wp_title(''); echo ' - some more keywords';
Category name is not showing in title tag, everything else does.
How should this line look like?
Thanks
This code displays category name outside of the loop, but don't know how to make it work inside title tag
<?php
foreach((get_the_category()) as $category) {
echo $category->cat_name . ' ';
}
?>Anyone?
did you ever figure this out? i'm having the same problem
Give this a shot....
<title><?
if(is_front_page())
{ echo get_bloginfo('name') . ' » ' . get_bloginfo('description'); }
else {
wp_title('«',true,'right');
if(is_single())
{
$category = get_the_category();
echo $category[0]->cat_name . ' «';
}
echo ' ' . get_bloginfo('name');
}
?></title>This topic has been closed to new replies.