Check If comment author is registered

I wonder if you mean this kind of check: if( $comment->user_id > 0 ) { // Registered comment author } in your comment’s template callback. This is determined in the the wp-comments-post.php file: $commentdata = compact(‘comment_post_ID’, …, ‘user_ID’ ); $comment_id = wp_new_comment( $commentdata ); but it’s not obvious where the user_ID variable comes from, since … Read more

What should I do to make generated avatars different for anonymous comments?

There are two ways to customize the default avatar: Add a new default avatar to Settings/Discussion. Change the output of get_avatar(). Let’s start with the first option; this processes slightly faster. Add a new default avatar to Settings/Discussion There is a filter ‘avatar_defaults’. You can add more avatars here. You get an array of default … Read more

3 moderators to approve comment

you can use comment_unapproved_to_approved action hook to call your function which will use a commentmeta field to count how many times that comment has been approved or by how many users and if it’s less then 3 then we updated the comment to not approved : update I’m posting an updated code in the form … Read more

comments reply script not working

Don’t link the script file directly. Enqueue it instead, e.g. in functions.php: function mytheme_enqueue_comment_reply() { // on single blog post pages with comments open and threaded comments if ( is_singular() && comments_open() && get_option( ‘thread_comments’ ) ) { // enqueue the javascript that performs in-link comment reply fanciness wp_enqueue_script( ‘comment-reply’ ); } } // Hook … Read more

Comments not appearing at all

Stupid question : Is it possible that your theme doesn’t include the comments on display? In addition to settings, your theme must display comments. The default function provided by WP is comments_template (to use on single.php and/or page.php) : comments_template( ”, true ); UPDATE ————————————————— I believe there is something wrong with the theme “hueman”. … Read more

How do we remove the H3 tag for the reply-title I.D

Today there is a native option to do this without hacking the core, or doing tricky filters with output buffer. You just need to use the filter ‘comment_form_defaults’ and edit the values from ‘title_reply_before’ and ‘title_reply_after’ key: add_filter( ‘comment_form_defaults’, ‘custom_reply_title’ ); function custom_reply_title( $defaults ){ $defaults[‘title_reply_before’] = ‘<span id=”reply-title” class=”h4 comment-reply-title”>’; $defaults[‘title_reply_after’] = ‘</span>’; return … Read more

Comment Reply javascript

You should really use comment_form() instead of rolling your own. Still, if you must, make sure that: The textarea has id=”comment”. The wrapping container around the entire comment form (probably a DIV) has id=”respond”.

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