Removing the allowed HTML tags and attributes note after the comment form in WordPress


Note :This snippet works only with the Classical style option. The Classical style option can be enabled in Appearance > Customize > Advanced > Theme Style. More about the theme style option here


Those last days I have had a recurrring request on how to remove the text describing the HTML tags allowed in comments : “You may use these HTML tags and attributes …“.

removing-text-below-comment

 

 

This is pretty simple to remove this note in WordPress since it is declared in an array assigned to a hook. You just need to hook in the ‘comment_form_default_fields’ array and set your desired custom value or just an empty string.

Check the source code here.

The Html tag text is declared with the comment_note_after key of the array(). That’s the one that will be modified in the following code snippet.

This code has to be pasted in your functions.php. More about customizing your WordPress theme.


Related Snippets you may also like


33 thoughts on “Removing the allowed HTML tags and attributes note after the comment form in WordPress

Comments are closed.