How to remove allowed html tags and attributes from beneath the comment field in Wordpress?

Wordpress

On a blog packed with information you only want the necessary information to be visible. If you have blogged for a while you have probably noticed that very few people add any HTML tag or attribute to their comments (except from spammers), so why keep the information about allowed HTML tags and attributes beneath the comment field visible?

If you want to remove the text displaying the allowed tags, HTML code and attributes from your WordPress site it can easily be done, but you have to manually edit the source code and remove the code. Where this code can be found might differ from theme to theme, but in general you will succeed in removing the information text if you follow these steps.

You may use these HTML tags and attributes

Get rid of the information about allowed HTML tags and attributes

Remove the information about allowed HTML codes in WordPress

I have read lots of different articles on this topic, and it might as I mentioned earlier differ a bit from theme to theme, but what we have added to our source code here at How To Blog Info is the following code.

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

This code was added to the bottom of the style.css. It made the following text disappear within seconds: „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>”

If you want that text to be removed, try adding the code and hopefully it will work for you as well. In case it doe

Since I removed the text here in this blog I thought I should try it in another site I run using Pagelines WordPress theme. I added the code to the custom code space in the Pagelines theme and saved. I visited the site again, but no changes could be seen. Then I remembered that I use Quick Cache on the site and quickly deleted the cache. After deleting the cache it still did not work. Then I waited some minutes and I deleted the cache again, and then it started to work. So, use some patience, and hopefully it will work for you as well!

12 Responses

  1. Everyone who runs a website should read this post. I have built many sites over the years, and never knew how that the html code for anchor text could be removed. Thanks.

  2. I help administer a WP website that uses the Chameleon Theme and that code kept showing up in the comments section. It was very frustrating trying to figure out where that code was located and how to get rid of it. It wasn’t in the Comments.php in the Editor. Exactly where that code is located within the theme would be nice to know and nice to be able to just remove it or hide it. This information provided above fixed my problem and I want to say THANK YOU…THANK YOU…THANK YOU!!!
    As soon as I inserted that code
    .form-allowed-tags{
    display:none;
    }
    into the Chameleon: Stylesheet (style.css), that „You may use these HTML tags and attributes: ” was gone from the website comments section.

    Thank you so very much and I would advise others that have this problem to give this a try. I see that code on many other WordPress sites. The WordPress people should be fixing that problem when they do their updates!

  3. thank you very useful article for me. It helped me greatly and finally I was able to remove those attribution stuff in WordPress!

  4. to add to the confusion:
    http://codex.wordpress.org/Function_Reference/comment_form

    the allowed html tag list (with the corresponding css class) comes directly from the comment_form() code.
    if you can find where the comment_form() is called (probably comments.php), you can change it there to remove the ‘comment_notes_after’.

    there is no need for the theme to have this class anywhere in the css files.
    if you want to use it, add it to the usual css file – in arras this is user.css.

  5. Thank you so much! When I looked up how to fix this issue everyone had very complicated solutions that as a person completely new to WordPress, I just couldn’t understand!

Leave a Reply