Get Category Name By ID (WordPress)

7

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

7 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…

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>