Make WordPress Core

Opened 13 years ago

Last modified 2 years ago

#7740 new feature request

Merge Tags

Reported by: hempsworth Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.7
Component: Taxonomy Keywords: needs-patch 2nd-opinion
Focuses: Cc:


As mentioned in a support thread, tags can get cluttered over time with many different tags meaning basically the same thing. To clean up tagging the ability to merge tags would be a life saver.

The functionality I had in mind was being able to select two or more tags in edit-tags.php and select 'Merge' from the 'Actions' dropdown. When you click 'Apply' a lightbox would open with the following:

What should become the primary tag?
The name is how the tag appears on your site.

What should become the primary tag slug?
The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.

Which slugs should continue to point to the new primary tag?
[Textarea automatically filled with the old slugs]
One slug per line.

Save | Cancel

The last textarea allows old slugs to still point to the new primary tag - meaning any old URL's will still work.

-~- Example -~-~-~-~-~-~-~-~

I've got the following tags which all mean the same thing:

TV, the box, telly

I select them all in edit-tags.php, select 'Merge' and 'Apply'. In the popup box I choose 'television' as the primary tag, 'television' as the slug, and list the old tags in the textarea.

I now have a tag called 'television' which has "television, TV, the box, telly" all pointing to it, so my old URL's still work. All of my posts which use the old tags have now magically swapped to using 'television'.

Change History (15)

#1 @AaronCampbell
13 years ago

I love the idea. I actually just went through and merged some of my tags manually, which involves re-tagging posts with the correct one. I honestly don't have the need for old slugs to point to the new tag, but I'm sure some people do.

I see this becoming a little less necessary now with auto-completion on tag names, but it would still be nice.

#2 follow-up: @DD32
13 years ago

The Taxonomy system currently has the ability to mark a tag as an alias of another doesnt it?

I believe the original intention was to allow for a plugin to come along and provide the UI/features and then to integrate it into WP if there was a good usecase selection...

Has any plugins come along to fill that gap in yet?

#3 @ryan
13 years ago

  • Milestone changed from 2.8 to 2.9
  • Type changed from enhancement to feature request

#4 @Denis-de-Bernardy
13 years ago

  • Keywords needs-patch added

#5 @Denis-de-Bernardy
12 years ago

  • Component changed from Administration to Taxonomy

#6 @Denis-de-Bernardy
12 years ago

  • Milestone changed from 2.9 to Future Release

#7 in reply to: ↑ 2 @scribu
12 years ago

Replying to DD32:

Has any plugins come along to fill that gap in yet?

I've made one: Merge Tags

#8 @kevinB
11 years ago

  • Cc kevinB added

#9 @solarissmoke
10 years ago

  • Keywords dev-feedback added

Is there traction for putting this into core? Or can we just leave it for scribu's handy plugin?

#10 @SecGen
10 years ago

I was about to create a ticket requesting this feature. In my opinion the managing and merging of tags in this way is such basic functionality that should ideally be available as part of a core WordPress setup.

#11 @wonderboymusic
8 years ago

  • Keywords dev-feedback removed

#12 @celloexpressions
7 years ago

This is still something that would be very useful, and it should probably be in core, as tags have an unfortunate tendency to become untenable. In terms of UI, I think adding a bulk edit item in edit-tags.php, which then brings up a select dropdown to choose which of the selected tags to merge into would be best, at least initially, as that is simpler than having to enter a new tag name, and the merged tag could always be renamed.

This ticket was mentioned in Slack in #design by chriscct7. View the logs.

6 years ago

#14 @swissspidy
5 years ago

  • Keywords 2nd-opinion added

The Categories to Tags Converter is listed on the Import screen. Perhaps a Merge Tags plugin could be listed there too? I have to admit adding this to the bulk options dropdown would be very unobtrusive though…

#15 @celloexpressions
2 years ago

This remains a problem that I've run into on nearly every site that I've managed. There are manual workarounds and plugins that can accomplish this. However, it seems like a desired workflow that would be best addressed by core. There is likely a lack of vocal desire for this functionality due to the laborious-yet-non-technical workaround to manually edit tag assignment post-by-post and the delete the emptied tag.

One UI approach could be to integrate a merge capability with the tag-delete (and/or bulk-delete) functionality. An option to assign all posts in a tag being deleted to a different (existing) tag.

Note: See TracTickets for help on using tickets.