WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#33790 closed feature request (invalid)

Taxonomy sharing between Users and Posts

Reported by: landwire Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Taxonomy Keywords:
Focuses: Cc:
PR Number:

Description

I have been asking this question in the forum many months ago, but never got an answer, so I see if trac is a better place to post it.

Basically I would like to share a taxonomy between users and posts. At the moment this does not seem possible, but I know that the terms are getting a major overhaul at the moment and was wondering if that might change too.

"The wp_term_relationships table just stores an object_id. Once there's a post and a user with the same ID, everything gets messed up because then, the term is assigned to both, user and post with that ID."

Are there any plans to make term sharing between users and posts possible, so that I do not have to create parallel taxonomies and terms in each taxonomy? Like adding a column that holds the "object_type", i.e user or post. Not sure what the best approach would be.

If not, I guess I have a few options:

  1. Create a "user taxonomy" and mostly duplicate 1000 or so terms.
  1. Wait until term_meta is implemented and then save a meta field, with each connection, that distinguishes between user and post ID...

What do you think is the better approach. Or is there another solution?

Change History (1)

#1 @swissspidy
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

I'm sorry you didn't get an answer to your post in the support forums, but Trac is for reporting bugs and enhancements in WordPress core – not support questions like this.

Coincidentally, there was a discussion about this recently on Slack. Quote:

The taxonomy system at present is not designed to associate two different sets of objects with a single taxonomy. Even with the simplification that’s currently underway, that’s not going to change unfortunately.

The same approaches have been mentioned there, so I suggest you to read to logs.

Note: See TracTickets for help on using tickets.