WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running an add_filter function on the_content and I need to run the same function on the category description.

Does something like that exist or do I need to create a custom function for it?

share|improve this question
up vote 1 down vote accepted

Sure, hook it right onto category_description.

Here's an example:

function category_desc_filter( $desc, $cat_id ) {
    $desc = 'Description: ' . $desc;
    return $desc;
add_filter( 'category_description', 'category_desc_filter' );

Didn't test it but based on the Codex it should work.

See the Codex for more info: http://codex.wordpress.org/Plugin_API/Filter_Reference#Category_and_Term_Filters

share|improve this answer
+1 Thanks Jared, checking it now. – N2Mystic Jan 23 '12 at 5:32
@N2Mystic No problem, if it works don't forget to accept my answer. :) – Jared Jan 23 '12 at 6:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.