Skip to content

Instantly share code, notes, and snippets.

@coenjacobs
Created April 27, 2012 15:30
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coenjacobs/2510177 to your computer and use it in GitHub Desktop.
Save coenjacobs/2510177 to your computer and use it in GitHub Desktop.
Allow HTML in term (category, tag) descriptions
foreach ( array( 'pre_term_description' ) as $filter ) {
remove_filter( $filter, 'wp_filter_kses' );
}
foreach ( array( 'term_description' ) as $filter ) {
remove_filter( $filter, 'wp_kses_data' );
}
@emaildano
Copy link

Worked like a charm.

@elvinlee
Copy link

How about allow shortcode in term? For example WooCommerce Product Categories descriptions.

@Ark74
Copy link

Ark74 commented Apr 24, 2017

Hi, i'm a little confused, so this is for product category category, right?
Can this be used to allow html on a product description, i believe @elvinlee and i are looking for the same thing.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment