Knowledge Base

Remove allowed tags

The allowed HTML tags a user can utilize in a comment are listing just below the new reply textarea


many users do not want them there, so let’s find out how to remove them.

You will need to edit your theme’s functions.php file and paste this

add_filter( 'comment_form_defaults', 'remove_comment_form_allowed_tags' );
function remove_comment_form_allowed_tags( $defaults ) {
    $defaults['comment_notes_after'] = '';
    return $defaults;

at the very bottom of the file, if the file ends in a PHP closing tag ?> you paste the code just above the tag, save and the allowed tags are gone.

For a limited time, take 30% off. Use code at checkout: WORDPRESSBuy Now