Category Descriptions – HTML?

Is it possible to allow HTML to be rendered in Category descriptions? My theme uses them quite a lot, and I’d like to style them better with images and links.

This seems to be do-able from what I read elsewhere, but I wondered if there is a best practice to get it to work (I’d prefer not to use a barely supported plugin).

Read More

Many thanks,

R

Related posts

1 comment

  1. The HTML is stripped by wp_filter_kses(). So this should work:

    remove_filter( 'pre_term_description', 'wp_filter_kses' );
    

    When you want to print that content, use wpautop():

    echo wpautop( term_description() );
    

Comments are closed.