How To Disable HTML in WordPress Comments

If you don’t want users to post HTML in comments on your site, you can post the code below into your WordPress theme’s functions.php file:


/* Disable Hyperlinks in WordPress Comments */
remove_filter('comment_text', 'make_clickable', 9);
add_filter('pre_comment_content', 'strip_comment_links');

function strip_comment_links($content) {

global $allowedtags;

$tags = $allowedtags;
unset($tags['a']);
$content = addslashes(wp_kses(stripslashes($content), $tags));

return $content;
}

Other Helpful Articles

Tips For Setting Up An E-Commerce Store

Need some tips for setting up an e-Commerce store? Having an online shop, such as an e-Commerce store, can be both exciting and overwhelming. However, if you market it right, you can make a good income off of it. When web design companies build e-Commerce sites for their clients, there’s

Read More »

How To Create an Email Signature in Gmail/G Suite

You may have noticed many businesses and individuals will have email signatures that look professional. If you have Gmail or G Suite, there’s actually a pretty easy way to set one up. To start creating your email signature, sign in to your Gmail account. Over in the top right you’ll

Read More »

Choosing A Domain Name

Selecting a domain name for your website is one of the first things a website needs and probably one of the most difficult. The domain name is what someone types into the URL box on a browser to get to a site. Think of it as an unique location identifier

Read More »

What Do You Need Done?:

(Please check all that apply)

Tell Us About You

Almost Done!

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info

Let's Get Some Info