Display Authors Comments on Profile Page

What you need to use here is the WP_Comment_Query() function. So on the author.php page, you can easily get the author info and ID as followed: // get author info $curauth = (isset($_GET[‘author_name’])) ? get_user_by(‘slug’, $author_name) : get_userdata(intval($author)); // set ID $user_id = $curauth->ID; Then we add the user ID in the query arguments array: … Read more

Remove Comments Metabox but still allow comments

Don’t remove this via CSS. The _POST part is also active and WP save the data! Use the hooks to remove meta boxes; code by scratch. function fb_remove_comments_meta_boxes() { remove_meta_box( ‘commentstatusdiv’, ‘post’, ‘normal’ ); remove_meta_box( ‘commentstatusdiv’, ‘page’, ‘normal’ ); // remove trackbacks remove_meta_box( ‘trackbacksdiv’, ‘post’, ‘normal’ ); remove_meta_box( ‘trackbacksdiv’, ‘page’, ‘normal’ ); } add_action( ‘admin_init’, … 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”.