Hey there!
Somehow I missed your post.
It’s not exactly what you need, but you can use the {taxonomy} Content Tag. It’ll output something like this:
<a href="CATEGORY-URL-HERE" class="category category-CATEGORY-ID-HERE">CATEGORY NAME</a>
Alternatively: WPP Filter Hooks.
-
This reply was modified 8 years, 8 months ago by
Hector Cabrera. Reason: Added link to WPP Filter Hooks
The layout of my template requires the ID of the category on the post container:
<article class="post-1 cat-1"><!-- other post html --></article>
<article class="post-2 cat-5"><!-- other post html --></article>
<article class="post-3 cat-1"><!-- other post html --></article>
So for me it would be very useful to have in the template a tag for the category ID
In that case you’ll have to use WPP’s filter hooks -as I already suggested above- since at the moment, as you know, there’s no content tag to get the category ID.