Spammers attacking my WordPress Site – Removing URL field from core? [closed]

The decision about comment status upon posting is made by wp_allow_comment() function. There is a filter in it that can be used to change it accordingly. Basic form would look something like this (not tested): add_filter( ‘pre_comment_approved’, function( $approved, $commentdata ) { if ( ! empty( $commentdata[‘comment_author_url’] ) ) { return ‘spam’; } return $approved; … Read more

Redirect when click on “response” in comment section

You could create an alternative comments template that is based off of the regular WordPress template, and create a link in place of the “respond” button that links to your custom post. Instead of calling <?php comments_template(); ?> Just call <?php comments_template(‘/custom-comments.php’); ?> Here’s the WordPress article for reference – https://codex.wordpress.org/Function_Reference/comments_template

Count comment threads, not total comments in a post

You could try this, must be used in the loop: <?php // type = comment will only get “real” comments, no ping-/trackbacks $comments = get_comments(array(‘type’ => ‘comment’)); $threads = 0; foreach($comments as $comment) { // if the comment has no parent, it´s the first of a thread if($comment->parent == ”) { $threads++; } } switch($threads) … Read more

css hide all the comment reply links except the lowest nested comments

I believe the easiest way to do that will be with javascript. Something that will navigate at each comment list and show only last button. Something like: jQuery(document).ready( function($){ //Hide all buttons $(‘.comments li .reply-button’).hide(0); //Navigate through all comments $(‘.comments li’).each( function() { //Lets check if there is children comments in this one if (! … Read more