Hello,
I want to stop all automatic spam comments on my site. So wanted to remove the website field and disallow submitting comments if a user enters any link in the comment box.
Is the following functions.php code compatible with the Newspaper Tech news demo theme?
To Remove Comment Author Link:
function tagdiv_remove_comment_author_link( $return, $author, $comment_ID ) {
return $author;
}
add_filter( 'get_comment_author_link', 'tagdiv_remove_comment_author_link', 10, 3 );
function tagdiv_remove_comment_author_url() {
return false;
}
add_filter( 'get_comment_author_url', 'tagdiv_remove_comment_author_url');
To protect entering the website/link in the comments summary box
function remove_website_field($fields) {
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields', 'remove_website_field');
If the above code is not compatible, please share the correct one.
Regards,
Hello,
Please check these topics
-> https://forum.tagdiv.com/topic/remove-the-website-from-the-comment-box/
-> https://stackoverflow.com/questions/7953160/how-can-remove-email-and-website-in-comments-wordpress
Hope this help you!
Thank you!
Hello,
Please try to add the code for the mobile theme in wp-content/plugins/td-composer/mobile/functions.php -> https://i.imgur.com/gHq11Rh.png
Thank you!