• Resolved Alex Kozack

    (@cawa-93)


    Hey. I want to ask you to add support for the category ID in the custom output:

    
    <div class="cat-{catogory_id}">{category}</div>
    

    This is necessary for my theme: the individual design of each link to the category.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    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 7 years, 5 months ago by Hector Cabrera. Reason: Added link to WPP Filter Hooks
    Thread Starter Alex Kozack

    (@cawa-93)

    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

    Plugin Author Hector Cabrera

    (@hcabrera)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category ID’ is closed to new replies.