Remove links from comment in WordPress

If are doing serious blogging and stable as professional blogger than you should avoid all the major things which take down of your post and article.
When you post useful and informative article on your blog and it's become popular you received many comments everyday. Comments increase your passion and encourage to write more article but spam comments and links forward your users to another websites and it's every spam down your hard work which you wrote.
Due to all kind of these problem I decide to share a simple and easy way by applying you can block spam comments and links.

Remove Links from CommentOpen your functions.php and paste below code :

function dez_remove_post_author_weburl($return) {
global $comment, $post;
if( !is_admin() ): //only run outside dashboard 
if ( $comment->user_id == $post->post_author ) {
$author = get_comment_author( get_comment_ID() );
$return = $author; //return post author display name only
return $return;
} else {
return $return; //return default
add_filter( 'get_comment_author_link', 'dez_remove_post_author_weburl');

If above code not work with your WordPress, don't worry download a small plugin Remove Links From Comment from below and install.

Now no one can spam you entering website in comment is disabled. Enjoy !

Himanshu is a young engineer living in India. Currently working at Cognizant as a Senior Engineer. He is an ethical hacker & blogger too, doing lots of crazy stuff... If you seem interesting, go through his portfolio: : "Open Source. Millions of open minds can't be wrong!

8 comments: On Remove links from comment in WordPress

Leave a reply:

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Site Footer

Sliding Sidebar

We are India’s largest Startup Community

We are team of ' Delhi Startups ' , most active startup community with strict spam policy.
We are making !deas happen..for future, business and jobs without charging anything, with connecting entrepreneurs.. It's a reason to trust on us.
Come and join or subscribe, we will defiantly give a reason to like us.

Our Facebook Page