Unique IDs for Post Types and Taxonomies

Sometimes I have duplicate IDs between Post Types and Taxonomies, I know this happens because they are stored in different tables but I wish it was possible to have a unique ID for each thing in WP, is there a way to achieve this?

Topic id post-type taxonomy Wordpress

Category Web


The only way I could think to achieve this would be to query the DB and build a list of ids, then check to make sure none of the ids match, but that might be a very taxing query. You would also need to change the way the id's for each table would be updated which could get a bit messy, but I believe it's possible it would just take quite a bit of effort.

You might be able to use something like: https://developer.wordpress.org/reference/functions/wp_unique_id/ to increment your unique ids, but this will probably take a lot of effort.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.