- - - - -

Allowing HTML code in WordPress


  • Please log in to reply
No replies to this topic

#1 Chris Black

Chris Black

    Small Orange

  • Members
  • PipPip
  • 12 posts

Posted 25 February 2012 - 02:41 PM

I'm running WordPress 3.3.1 and I'd like to allow certain HTML code and/or BBcode (I've installed the BBCode plugin and it works just fine in regular posts). I suppose I could add theme directly to the kses filter, but I'd rather not have to re-edit core files after every upgrade. I tried adding the following to my theme's functions.php, but didn't have any luck:

<code>
add_filter('preprocess_comment','fa_allow_tags_in_comments');

function fa_allow_tags_in_comments($data) {
global $allowedtags;
$allowedtags['blockquote'] = array();
return $data;
}
</code>

Anyone know of a working solution for this?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users