Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#4883 closed enhancement (invalid)

Option for Combined Link and Post Categories

Reported by: karmadude's profile karmadude Owned by:
Milestone: Priority: high
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

It looks like some of the discussions over at #4015 were ignored while separating link and post categories. There are certain sites where this separation causes unnecessary duplication of categories and the headaches that go with it.

Some of these sites, including mine, could benefit if WordPress provided an option to use one category structure for both links and posts. With the current taxonomy architecture, this could be achieved if an additional entry is made in the term_taxonomy table, setting a category as both category and link_category.

Change History (7)

#1 @markjaquith
18 years ago

Sounds like a good job for a plugin. We erred on the side of giving users more freedom in their taxonomies. The only thing that is really separated between categories and link categories is their hierarchy, as designated by the "parent" column in the term_taxonomy table. You could write a plugin that designates one taxonomy as the authoritative one for hierarchy and have the other taxonomy mimic it.

I'll leave this open for discussion, but the merging of categories and link categories was fairly unpopular, so I don't predict that many people are going to be in favor of having that in core.

#2 follow-up: @ryan
18 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Sharing structure between taxonomies screws up parenting and counts, among other things. Putting multiple taxonomies in the term_taxonomy table compromises the entire purpose of that table.

Note that the name, slug, and id are shared between categories and link categories of the same name. As Mark mentions, a plugin could automatically create term_taxonomy entries for both categories and link categories whenever one or the other is created. Care would have to be taken with the parent and count fields, however.

This was discussed heavily during the course of the taxonomy design and implementation. Shared terms and separate taxonomies won.

#3 in reply to: ↑ 2 @karmadude
18 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

If a plugin can make this happen, I guess that will work. Sharing structure does not screw up counts and parenting, because in the term_taxonomy table you differentiate post and link categories via taxonomy field(category, link_category). The two entries for the same category will maintain parenting count, give it a try:

  1. Create a post category (let's say term_id 3)
  2. Insert another record for term_id 3 in term_taxonomy table but set taxonomy to link_category, and set the parenting value to match the category record.
  3. Go to Admin page, and you will see the same category show up in both link and post categories
  4. Try adding posts and links to this category, and you will see counts and parenting working correctly.

So Ryan, your assumption is off here. I would say you take a look at the taxonomy tables, and api again. As for slugs, names and id's there could be issues of conflict here, but if these are based off the information in then term_taxonomy table, then it should work correctly.

@Mark, I understand the discussions which went into the the decision of not merging link and post categories. But, I am not asking for a exclusive solution, but a solution that makes both scenarios possible. So if a user wants to use the same category for both they can, and users who wants to use different categories for both can do so as well. I don't see why people are thinking one or other instead of both!

I am turning this ticket back on because this an enhancement request, not a bug fix!

#4 @foolswisdom
18 years ago

  • Milestone changed from 2.3 to 2.4 (next)

#5 @karmadude
18 years ago

Foolswidom, thank you for keeping hope alive :) I hope I am not pissing some of you off with my persistence with this feature. I just feel WordPress categories can be a lot more powerful, if we stop thinking of it as just post and link categories. The taxonomy concept is a step in the right direction, but it still carries the baggage of thinking of categories as just post and link categories.

#6 @ryan
18 years ago

karmadude, I meant putting multiple taxonomies in one row of term_taxonomy table, which is what I thought you were advocating. What you just described is exactly the way it works and is meant to work.

#7 @foolswisdom
18 years ago

  • Milestone 2.4 (next) deleted
  • Resolution set to invalid
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.