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...

About Michael Bohatch - SimpleInbound

Michael Bohatch has been involved with SEO and Inbound Marketing since its inception. Michael provides professional services that combine his experience in Web Analytics, SEM, SEO and Inbound Marketing for a comprehensive strategic approach to web optimization. SimpleInbound.com is an advice blog where he documents some of his findings.
This entry was posted in Wordpress and tagged , . Bookmark the permalink.
If you would like to stay current on our Inbound Marketing Techniques, make sure to:
Subscribe to the RSS Feed!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>