Skip Navigation

[Resolved] Output Taxonomy ID

This support ticket is created 4 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1527863

I am looping over Posts. I want to output the taxonomy ID - not the slug.

This post doesn't seem to be working: https://toolset.com/forums/topic/how-do-i-show-a-taxonomy-id-instead-of-the-name/

Shouldn't this be built-in by now?

Let me know how you recommend outputting the taxonomy ID.

#1528131

Hello,

It does not custom codes, you can setup a child taxonomy view to output the term's ID, for example:
Create a taxonomy view:
- Query terms of your custom taxonomy
- Filter by:
Taxonomy is set by the current post
- In view's loop, display the term's ID:
[wpv-taxonomy-id]

Put above taxonomy view insider your post view's loop, it can also output term's ID of current post.