Plugin Directory

Custom Category and Tag Page Titles

This plugin adds fields to set custom titles for category and tag archive pages

How do I set a custom title?

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.

Where does this title show?

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').

How can I show both the 'default' archive title as well as custom titles, but without the prefix 'Category Archives: '?

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

Ratings

2 stars
2 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
1 person says it's broken.

50,2,1
0,1,0