Title: Getting category description
Last modified: August 30, 2016

---

# Getting category description

 *  Resolved [Yahya98](https://wordpress.org/support/users/yahya98/)
 * (@yahya98)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/getting-category-description/)
 * Okay, so i hope i dont get ignored like my last post [here ](https://wordpress.org/support/topic/adding-something-at-the-bottomtop-of-the-post?replies=5)
   
   I managed to fix the problem on my own, but now im having trouble getting the
   category name. Im currently using this script to get the category description:
 *     ```
       $cat_name = get_the_category( get_the_ID );
       $category_id = get_cat_ID( $cat_name );
       echo category_description( $category_id );
       ```
   
 * The problem is, it doesn’t get the category name… when i replace $cat_name with
   the category name, it works on my website. The thing is, i don’t want the same
   thing on every post i have, i want it to have different description for each 
   category.
 * Just tell me what’s wrong with the script while getting the category name, or
   some other simpler way to do this.
 * Thanks

Viewing 1 replies (of 1 total)

 *  Thread Starter [Yahya98](https://wordpress.org/support/users/yahya98/)
 * (@yahya98)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/getting-category-description/#post-6205683)
 * Nvm

Viewing 1 replies (of 1 total)

The topic ‘Getting category description’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [description](https://wordpress.org/support/topic-tag/description/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [get](https://wordpress.org/support/topic-tag/get/)
 * [id](https://wordpress.org/support/topic-tag/id/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [script](https://wordpress.org/support/topic-tag/script/)
 * [string](https://wordpress.org/support/topic-tag/string/)

 * 1 reply
 * 1 participant
 * Last reply from: [Yahya98](https://wordpress.org/support/users/yahya98/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/getting-category-description/#post-6205683)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
