This plugin adds fields to set custom titles for category and tag archive pages
Login to WP-Admin, go to the Posts menu, and click either the Categories or Tags submenu. Then open a specific category/tag, where you will be shown a form with the title 'Edit Tag'. There is a field called 'Title', which is where you must put your preferred custom title.
This title will show wherever WordPress calls the single_cat_title and single_tag_title filters. This means it will show both in your tag and your page title ('Category Archives: Foobar').
So you want to show the custom title WITHOUT the prefix ('Category Archives: ') on pages where it is set, but when it's not set, just show it normally (WITH the prefix).
<?php
if ( is_category() ) {
$single_cat_title = single_cat_title( '', false );
$single_cat_title_c = get_the_category();
$single_cat_title_default = $single_cat_title_c[0]->cat_name;
?><span><?php
if( $single_cat_title_default != $single_cat_title ) { // Detecting customization via plugin (since there is no hook for modifying the prefix)
echo $single_cat_title;
} else {
echo 'Category Archives: ' . $single_cat_title_default;
}
?></span><?php
}
?>
Requires: 3.0.1 or higher
Compatible up to: 3.4.2
Last Updated: 2012-10-7
Downloads: 490
Got something to say? Need help?