Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Ok i found the code to change the "TAGS" to another name..

I changed my tags to say "Celebrities" but the permalinks still says TAGS i want it to say "Celebrities" how do i do this.

Here is the code i use

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',
    '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';
}

but the permalinks still say "tag" why is that

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

You can set your tag base differently in the admin area: Settings > Permalinks then at the bottom there is a field for "Tag Base". Enter "celebrities" in that field and your tag pages will be yoursite.com/celebrities/some-celeb-name.

As far as why that is, it's because the write rules -- register_taxonomy does more than just assign labels -- haven't been changed in your example above. Also, tags are special: WordPress gives you the option to change the base. So whatever the user puts in that field is going to override what you change the rewrite to be.

share|improve this answer
    
Thank you that worked lol –  Terrell Anderson Mar 22 '12 at 3:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.