I have added HTML code into my TAG description box, but for some reason the output doesn't display the required results.

I have even tried to add HREF tag manually into this box, but no hyperlinks are visible. The code contains tag_description();


You can't put HTML in taxonomy descriptions, but you can use a plugin such as http://wordpress.org/extend/plugins/allow-html-in-category-descriptions/ to enable that functionality.

| improve this answer | |
  • Thanks! Unfortunately, after several tries, I have figured out the plugin no longer works on WordPress 3.4.1 version. Is there anything else that I could use? (I am trying out other plugins right now) – Sid Sep 3 '12 at 17:41
  • If you can't find a plugin you could try making one yourself. I don't see why (on quick glance) that plugin wouldn't work. It simply removes the wp_filter_kses filter that turns off the HTML stripping: plugins.svn.wordpress.org/allow-html-in-category-descriptions/… – developdaly Sep 3 '12 at 17:46
  • I disabled RICH TEXT TAGS plugin and re-enabled the plugin you mentioned... and yes, it works perfectly. I can add HTML codes in the box now. I have spent 3 hours trying to understand all these stuffs, and finally you solved the problem in 10 minutes! Thanks developdaly! You are the man... – Sid Sep 3 '12 at 17:57

You can simply remove the filters - ( functions.php )

// Before saving into database
remove_filter( 'pre_term_description', 'wp_filter_kses' );

// Before displaying data 
remove_filter( 'term_description', 'wp_kses_data'     );
| improve this answer | |
  • Thank you so much, Amit! Right now I am using a plugin that does exactly what you have mentioned! This will be handy though. – Sid Sep 3 '12 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.