Title: html in comments
Last modified: August 31, 2016

---

# html in comments

 *  Resolved [aybennett](https://wordpress.org/support/users/aybennett/)
 * (@aybennett)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/html-in-comments-1/)
 * We recently began using the hueman theme on our site and I love it, but now the
   markup people having been using in comments, such as italics and blockquotes,
   is not visible. How can I change it to make commenters’ html tags work again?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/html-in-comments-1/#post-6977516)
 * Hello,
    Hope you are well.
 * Please try this code in functions.php file.
 *     ```
       // Create function which allows more tags within comments
       function allow_pres() {
         global $allowedtags;
         $allowedtags['pre'] = array('class'=>array());
       }
   
       // Add WordPress hook to use the function
       add_action('comment_post', 'allow_pres');
       ```
   
 * It is better to use a child theme, but I will admit it, I don’t, because my theme
   is never updated.
    [https://codex.wordpress.org/Child_Themes](https://codex.wordpress.org/Child_Themes)
 * Thanks.
 *  Thread Starter [aybennett](https://wordpress.org/support/users/aybennett/)
 * (@aybennett)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/html-in-comments-1/#post-6977610)
 * Thanks, but that didn’t seem to make a difference. Are there more steps I need
   to take? I did some more testing, and with or without the functions change, the
   <cite> tag works in the comments, but italics, bold and blockquote do not.
 *  [tech55541](https://wordpress.org/support/users/tech55541/)
 * (@tech55541)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/html-in-comments-1/#post-6977611)
 * Hello,
    I don’t know of anything else to try, maybe someone else can help you
   out.
 *  Thread Starter [aybennett](https://wordpress.org/support/users/aybennett/)
 * (@aybennett)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/html-in-comments-1/#post-6977658)
 * Here is an example of a comment on the site with bold and blockquote tags in 
   it. On the backend, I can see the markup and that it was done correctly, but 
   from the front, all the text looks the same. [http://www.the-exponent.com/a-public-service-announcement-for-bishops-and-stake-presidents/comment-page-1/#comment-1155812](http://www.the-exponent.com/a-public-service-announcement-for-bishops-and-stake-presidents/comment-page-1/#comment-1155812)
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/html-in-comments-1/#post-6977712)
 * Hi aybennett. This post describes another function you might try. Just add a 
   line for each html tag you want to use:
    [http://www.kavdesign.net/blog/coding/how-to-allow-more-html-tags-in-the-wordpress-comments/](http://www.kavdesign.net/blog/coding/how-to-allow-more-html-tags-in-the-wordpress-comments/)
 *  Thread Starter [aybennett](https://wordpress.org/support/users/aybennett/)
 * (@aybennett)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/html-in-comments-1/#post-6977805)
 * Thanks, but that did not change anything either. I am wondering if this is a 
   CSS issue? Is there something in the CSS for hueman than overrides the appearance
   of bolding and italicizing in the comments?
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/html-in-comments-1/#post-6977814)
 * The theme resets the following tags (among others) to the default font at the
   top of the theme style.css file:
 *     ```
       b, strong, i, em
       ```
   
 * It then sets the following styles for comments:
 *     ```
       .commentlist .comment-body strong { font-weight: bold; }
       .commentlist .comment-body em { font-style: italic; }
       ```
   
 * So, if you’re using the shorthand `<b>` and `<i>` tags, they’ll still be set 
   to the default font. If you change them to `<strong>` and `<em>` they should 
   work. Or, alternatively, you could add this to your custom css;
 *     ```
       /* bold font */
       .commentlist .comment-body b { font-weight: bold; }
       /* italic font */
       .commentlist .comment-body i { font-style: italic; }
       ```
   
 *  Thread Starter [aybennett](https://wordpress.org/support/users/aybennett/)
 * (@aybennett)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/html-in-comments-1/#post-6977844)
 * That worked! I also made a style for comment blockquotes and now it is all looking
   right again. Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘html in comments’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/hueman/3.7.27/screenshot.png)
 * Hueman
 * [Support Threads](https://wordpress.org/support/theme/hueman/)
 * [Active Topics](https://wordpress.org/support/theme/hueman/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/hueman/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/hueman/reviews/)

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [markup](https://wordpress.org/support/topic-tag/markup/)

 * 8 replies
 * 3 participants
 * Last reply from: [aybennett](https://wordpress.org/support/users/aybennett/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/html-in-comments-1/#post-6977844)
 * Status: resolved