Starting with WP 2.3 we can do this:

register_taxonomy('custom_taxonomy', array('user', 'post', 'link', 'comment'));

Those are different object types that belong to different tables and hence can have same primary key ID. Now if we take a look at the functions used to get or check terms, they all lack object_type parameter.

is_object_in_term( $object_id, $taxonomy, $terms = null );
wp_get_object_terms( $object_ids, $taxonomies, $args );

As a matter of fact, there is no reference to object type in term_relationships table at all, and you are going to get false positives for objects with same IDs. How can one fix that?

Read more here: Same taxonomy for different object types


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, ,

Wordpress related questions and answers: