Get Category Name By ID (WordPress)

13

Posted by: Jennifer Zelazny on June 29, 2009

Categorized: HOWTOs, SDAC Blog, WordPress

Tagged: , ,

I have been working on a new WordPress theme (to be released this week) and in one of the admin screens – I needed to get the category name by using the category ID. To do this (in or outside of the loop):

<?php get_cat_name( $cat_id ) ?>

Super simple – super helpful.

Reference: http://codex.wordpress.org/Function_Reference/get_cat_name

13 Responses to “Get Category Name By ID (WordPress)”

  1. r-a-y says:

    Thanks!
    Needed this!

  2. dandy says:

    Thanks, simple and really really useful in daily use.

  3. Thiago says:

    Thanks!

    Really very helpful!!

  4. Wowh.. that so simple but so usefull….
    Very2 I need!
    thanks ^^

  5. Totally awesome. i Goggled the simplest way to do this and i landed on correct page.

    Thanks Mate.

  6. Prashant says:

    Nice post it helped me a lot. Thanks…

  7. id meneo says:

    Always better explained on blogs than in WP codex… thanks it is useful!

  8. Nicolas says:

    Thanks. As simple as saying it… But yet useful to see it.

    note to “id meneo”, I think that the codex it pretty good. Not always “really obviously” clear, but pretty good.

  9. Thanks, this is what I was looking for. It’s true, sometimes the codex is a bit complicated to understand and if stuff is explained like this it’s easier to get it.

  10. Hardik Shroff says:

    Thanks..
    Very nice, simple and come to the point post.
    Keep posting..

  11. Thank you, I’ve recently been searching for information approximately this subject for ages and yours is the greatest I’ve found out so far. However, what about the bottom line? Are you positive in regards to the supply?|What i do not understood is if truth be told how you’re now not really a lot more neatly-appreciated than you may be now. You are very intelligent.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>