I’m intending to use the default “post tags” taxonomy to provide a common set of tags across posts and 2 custom post types (to allow for collection/aggregation by tag).
I’d like to rename the “post tags” taxonomy to something else – like “general tags’ – to make it a bit clearer, especially when this taxonomy is attached to other custom post types.
So, is there any way of doing this within WordPress, or do I do it via SQL. Also, anyone know if there is an expectation that this taxonomy exists with the nane “post tags”
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
The information about taxonomies is stored in the global $wp_taxonomies array. If you register a new taxonomy, it is added as an object with different properties, including the labels to use in the UI. The standard tags and categories are also registered there on each page load, with the create_initial_taxonomies() function that fires on init.
Since it is a simple array of objects, we can modify it and see what happens. The properties we are interested in are labels and label.
add_action( 'init', 'wpa4182_init');
function wpa4182_init()
{
global $wp_taxonomies;
// The list of labels we can modify comes from
// http://codex.wordpress.org/Function_Reference/register_taxonomy
// http://core.trac.wordpress.org/browser/branches/3.0/wp-includes/taxonomy.php#L350
$wp_taxonomies['post_tag']->labels = (object)array(
'name' => 'WPA 4182 Tags',
'menu_name' => 'WPA 4182 Tags',
'singular_name' => 'WPA 4182 Tag',
'search_items' => 'Search WPA 4182 Tags',
'popular_items' => 'Popular WPA 4182 Tags',
'all_items' => 'All WPA 4182 Tags',
'parent_item' => null, // Tags aren't hierarchical
'parent_item_colon' => null,
'edit_item' => 'Edit WPA 4182 Tag',
'update_item' => 'Update WPA 4182 Tag',
'add_new_item' => 'Add new WPA 4182 Tag',
'new_item_name' => 'New WPA 4182 Tag Name',
'separate_items_with_commas' => 'Separata WPA 4182 tags with commas',
'add_or_remove_items' => 'Add or remove WPA 4182 tags',
'choose_from_most_used' => 'Choose from the most used WPA 4182 tags',
);
$wp_taxonomies['post_tag']->label = 'WPA 4182 Tags';
}
I haven’t checked it everywhere, and you’ll probably have to change it in your theme yourself, but this seems to do what you want:

Method 2
Rename specific category labels:
add_action('init', 'renameCategory');
function renameCategory() {
global $wp_taxonomies;
$cat = $wp_taxonomies['category'];
$cat->label = 'My Categories';
$cat->labels->singular_name = 'My Categorie';
$cat->labels->name = $cat->label;
$cat->labels->menu_name = $cat->label;
//…
}
Labels:
http://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments
Method 3
You could remove the Categories taxonomy and then simply create your own.
In my example I’ve removed the post Categories taxonomy and replaced it with a Subjects taxonomy
add_action( 'init', 'unregister_taxonomy' );
function unregister_taxonomy() {
global $wp_taxonomies;
$taxonomy = 'category';
if ( taxonomy_exists($taxonomy) ){
unset( $wp_taxonomies[$taxonomy] );
}
}
function article_subjects() {
$labels = array(
'name' => _x( 'Subjects', 'Taxonomy General Name', 'dc' ),
'singular_name' => _x( 'Subject', 'Taxonomy Singular Name', 'dc' ),
'menu_name' => __( 'Subjects', 'dc' ),
'all_items' => __( 'All Items', 'dc' ),
'parent_item' => __( 'Parent Item', 'dc' ),
'parent_item_colon' => __( 'Parent Item:', 'dc' ),
'new_item_name' => __( 'New Subject', 'dc' ),
'add_new_item' => __( 'Add New Item', 'dc' ),
'edit_item' => __( 'Edit Item', 'dc' ),
'update_item' => __( 'Update Item', 'dc' ),
'separate_items_with_commas' => __( 'Separate items with commas', 'dc' ),
'search_items' => __( 'Search Items', 'dc' ),
'add_or_remove_items' => __( 'Add or remove items', 'dc' ),
'choose_from_most_used' => __( 'Choose from the most used items', 'dc' ),
'not_found' => __( 'Not Found', 'dc' ),
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
);
register_taxonomy( 'article_subjects', array( 'post' ), $args );
}
add_action( 'init', 'article_subjects', 0 );
Method 4
From here
// hook the translation filters
add_filter( 'gettext', 'change_post_to_article' );
add_filter( 'ngettext', 'change_post_to_article' );
function change_post_to_article( $translated ) {
$translated = str_ireplace( 'Post', 'Article', $translated ); // ireplace is PHP5 only
return $translated;
}
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0