Prioritizing the wordpress comments
Prioritizing the wordpress comments
Prioritizing the wordpress comments
It seems you need to change the Collation for the wp_comments and wp_commentmeta tables on your Live server to utf8mb4_unicode_ci.
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
Why do I have to manually approve comments from one of my users who already has an approved comment?
Using defer or async JavaScript attributes prevents pingbacks and trackbacks from being sent
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
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
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
comments_array filter doesn’t work in some themes
Unique User for all visitor, but possibility to comment with unique name