Show top commenters without using a plugin

$output .= “<li>”.(($result->comment_author_url) ? “<a href=””.$result->comment_author_url.””>” : “”).$result->comment_author.(($result->comment_author_url) ? “</a>” : “”).” (“.$result->comments_count.”)</li>”; edit: to show the avatar before the name: $output .= “<li>”.get_avatar($result->comment_author_email, 45).’ ‘.(($result->comment_author_url) ? “<a href=””.$result->comment_author_url.””>” : “”).$result->comment_author.(($result->comment_author_url) ? “</a>” : “”).” (“.$result->comments_count.”)</li>”;

Comments do not respect display_name setting, how to make plugin to overcome this

This code does the job with a filter. Doesn’t care what the comment says the author’s name is. Nothing particularly tricky about it. Should be self-explanatory. add_filter(‘get_comment_author’, ‘wpse31694_comment_author_display_name’); function wpse31694_comment_author_display_name($author) { global $comment; if (!empty($comment->user_id)){ $user=get_userdata($comment->user_id); $author=$user->display_name; } return $author; }

WordPress comments on users profile

I had to do accomplish something similar with an old client where they wanted a custom comment type to allow them to post editorial comments in the admin while a post is going through the editorial phase, but should not be visible on the front end. Since there are no custom comment types available in … Read more

Change order of comment fields

Some loose implementation of where I would start. The hooks ‘comment_form_default_fields’, ‘comment_form_defaults’, and the ‘comment_form_{location}’ hooks look promising. Line 1569 of comment-template.php is doing the fields, and line 1575 is doing the main field, you might be able to “trick” wordpress into putting the comment field up top…but all that seems like it would take … Read more