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

simpleinbound WP Wordpress: How to Add Images or HTML to Edit Descriptions field?By 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

pixel Wordpress: How to Add Images or HTML to Edit Descriptions field?
Be Sociable, Share!
  • more Wordpress: How to Add Images or HTML to Edit Descriptions field?
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>