Hi,
I created with Toolset a custom taxonomy which slug is "sector".
How can I figure out what is this taxonomy's ID? I want to use it in 3rd party plugin.
I tried "sector", "wpcf-sector" and "wpct-sector", but none of them is good.
I also checked DB, but haven't found the answer.
Thank you!
Hello,
There isn't taxonomy ID, in most case, you can use taxonomy slug, which is unique from other taxonomies.
And each term has it's unique term's ID, you can get the term ID by editing that term, and there is a URL parameter "tag_ID", the value is term's ID. See screenshot tag_ID.jpg
Hi,
like I wrote the first I tried was slug "sector" as ID. I also wrote what others I tried.
I tried "wpcf-sector" because this prefix ("wpcf-") works with Toolset created custom fields.
I tried "wpct-" prefix because it might be the possible abbreviation of WP Custom Taxonomy ( supposing "wpcf" means WP Custom Fields )
I don't know where did you create that screenshot, but I have similar at
Toolset / Edit Taxonomy
and its URL looks like:
hidden link
and it doesn't include such tag_IDs.
I attach a screenshot.
Thanks
As I mentioned above, there isn't taxonomy ID.
In your case, you can find the term ID by this:
Dashboard-> Brands-> Brand sectors
Edit any one of the term, you will see the URL parameter "tag_ID", it is term's ID.
More help:
https://codex.wordpress.org/Function_Reference/get_term#Return_Values
term_id (int)
Well, it is an integer and therefore it can not be used by 3rd party plugin.
I tried it in both versions: 17 and "17"
I'm honestly very disappointed again.
Multiple time I face with it: the concept of Toolset development is not consistent ( in some cases like for custom fields the entity ID is available and can be used by 3rd party in some cases, like this one it isn't ).
I again wasted hours of work hours and days of project time and I must find a new solution outside of Toolset...
I think there are some misunderstandings, the term's ID is a WordPress built-in feature, for example, you can find it in your website database, table "wp_terms", column "term_id", if your 3rd party plugin does not support term's ID, you will need to check it with 3rd party plugin author for it.
More help:
https://codex.wordpress.org/Database_Description#Table:_wp_terms
Well, I bought Toolset because I wanted to extend WP's core CPT, CF, CT etc. functionalities.
I also know I can manage 3rd party entities inside Toolset if I wish.
So if I create a custom field (CF) with Toolset, which has a string as ID and which can be used inside or outside of Toolset, then I might rightfully think the same concept exist for CT ( so if I create a custom taxonomy (CT) with Toolset, then the dev team of Toolset added the same feature, extending WP core functionality ).
That's what I named inconsistency in dev concept.
I don't want to keep sharing my detailed opinion here,
thank you for your help, we can close the ticket.