Sage 50
Cash Lady
Work from No Home
This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies. Find out more.

How to Remove HTML Tags from WordPress 3.x Comment Box

 Posted by
 

How to Remove HTML Tags from WordPress 3.x Comment Box

comment box

How to remove: “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> ” in the comment box above “Post Comment” button of Twenty ten WordPress 3.

This tutorial is going to guide you how to get rid of the html code under the message box in the WordPress twenty ten’s comment template.

First a warning, do not edit or delete the code from WordPress 3.x core files, instead hide it with CSS code.

  • Using CSS has the advantage of not requiring core file modifications (always a bad idea).

Put simply, you need to add the following line of code to the your Theme style sheet.

.form-allowed-tags { display:none; }

So, using the WP Twenty ten theme as an example, here are the steps:

1. Login to your WordPress dashboard

2. Go to Appearance/Editor.

3. Open the stylesheet file, style.css. It will be listed at the bottom of the right-hand column.

4. Go to the end of the style.css style sheet and enter the code on a new line:

.form-allowed-tags { display:none; }

5. Save the file (Update File button) and you’re done.

6. And that’s all there is too it. If you now inspect your comment box the offending HTML Tags will have gone.

Style-CSS

 

Well I hope you found this interesting and of use. See you soon.

You may also be interested in the following:

KingSolutions.org.uk is hosted on JustHost

  20 Responses to “How to Remove HTML Tags from WordPress 3.x Comment Box”

  1. My husband and i have been so thrilled when Louis could finish up his inquiry out of the ideas he was given from your weblog. It is now and again perplexing to just choose to be releasing concepts which often other folks have been selling. And we also recognize we have the blog owner to appreciate for that. All the illustrations you made, the easy web site navigation, the friendships you make it easier to instill – it’s got most overwhelming, and it’s helping our son in addition to us consider that this situation is excellent, and that is extremely indispensable. Thank you for the whole thing!

  2. hi,
    I created a small plugin out of your solution.
    At the time of writing the plugin wasn’t hosted by WordPress.org

    Site: http://webweb.ca/site/products/wp-notes-remover/

  3. WoW! Great and Ty for the info, now my comment box looks good!

  4. It’s challenging to find knowledgeable folks on this topic, but you sound like you know what you’re talking about! Thanks

  5. This hasn’t worked for me on the Coraline theme. Please help!

    If I share a post on Facebook all of that code shows up instead of my post excerpt!

    • Sorry Coral, I can only suggest you investigate the style sheet (css) for your theme. Your looking for the: .form-allowed-tags { display:none; } code.
      Your theme may have already overwritten/changed the code.

  6. thanks for sharing it with me

  7. Great, thank you for solving this problem

  8. You have shared something useful. Thanks a lot for the share.

  9. One of the easiest things I have modified in WordPress. Thanks you very much for the information. It just tidies the coment box up nicely and totally gets rid of the ugly looking code at the bottom scaring people aways :)

  10. This is the best post I have ever seen, thanks for posting

  11. Thanks for sharing this useful information! Hope that you will continue with the kind of stuff you are doing.

  12. That’s smart. Hiding the message instead of actually removing it.
    [URL not public - removed]

  13. Thank you so much for this post, been searching for hours! loll.

  14. Thanks for this, problem solved. I was trying to go through the comments.php code but couldn’t find it and google brought me here.

  15. Works perfect with all themes we use in wordpress 3.2.1, thank you!

  16. Works perfect, done in 1 minute. Thank you for that tip.

  17. thanx, it worked like a gem ;)

  18. Great post, this is brilliant. Thank you

107 queries in 1.907 seconds (Child).