WordPress: How to Add Images or HTML to “Edit Descriptions” field?

WordpressBy default WordPress is designed to strip out HTML code from this area. However you may want to modify your “edit descriptions” at times to add maybe a banner, graphi, or html coding
By adding the code below, you can do just that

If not familiar with the area I’m speaking of you can get there per:

POSTS–>CATEGORIES

then select the category you want to edit (click “edit” and paste your code into its “Description” field

TO SET UP WORDPRESS SO THAT YOU CAN ADD HTML CODE?

In the theme editor, open your theme’s functions.php file and add this code at the end (or before the closing php closing tag ?> if one is present)

// allows html in “edit descriptions” fields
$filters = array(‘term_description’,’category_description’,’pre_term_description’);
 foreach ( $filters as $filter ) {
 remove_filter($filter, ‘wptexturize’);
 remove_filter($filter, ‘convert_chars’);
 remove_filter($filter, ‘wpautop’);
 remove_filter($filter, ‘wp_filter_kses’);
 remove_filter($filter, ‘strip_tags’);
 }

That’s it, you should now be able to freely add your HTML to this section

Related Posts Plugin for WordPress, Blogger...