How do I change the text content of a div for a comment validation error message?

if your above Javascript is working fine and you want to insert that into a page. Kindly add the following code to your functions.php. I have tested this code it’s working fine. function handle_comment_error() { ?> <script> document.getElementById(“comment-error”).innerHTML = “Please enter your comment.”; </script> <?php }add_action(‘wp_head’, ‘handle_comment_error’); Let me know if you face any issues.

How to make comments private for commentor and post author

You can use the pre_get_comments filter to modify the parameters of the comment query before it fetches the comments. Specifically the author_in parameter. I tried to write an example, though I haven’t tested it, but it would be similar to this: add_action( ‘pre_get_comments’, ‘author_and_self_comment_filter’ ); function author_and_self_filter( \WP_Comment_Query $query ) : void { // We … Read more

List user comments in author page

Try with WP_Comment_Query and make sure you have the right Author ID from the Author Template. // WP_Comment_Query arguments $args = array ( ‘user_id’ => $user->ID, ‘post_status’ => ‘approve’, ‘number’ => ’10’, ); // The Comment Query $comments = new WP_Comment_Query; $comments = $comments->query( $args ); // The Comment Loop if ( $comments ) { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)