Recently I needed to enable html in category descriptions so that I could add a featured image to each of my category.
Here is the solution.
/** * Allow HTML in term (category, tag) descriptions * Note : You may want to restrict access to who can edit category description or of the sort. * Removing the filter will enable anyone to insert html/javascript code (which may be malicious) */ 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' ); }
I will release a small quick plugin for this when I have the time (hopefully soon)
Be First to Comment