Parent comment’s author name

In your comment callback, you could get that info with the help of the comment_parent property of the current $comment object. We can then use the comment_author() function to display the comment author’s name: // Display the parent comment author’s name: if( $comment->comment_parent ) comment_author( $comment->comment_parent ); and the comment_author_link() function to display the comment … Read more

Link name in comments to Author page? Comment Author Meta in Comments?

Edited my answer since the original code was slightly flawed. Tested and triplechecked this to make sure it does exactly what you’ve requested. 🙂 Enjoy! function comment_author_profile_link(){ /* Get the comment author information */ global $comment; $comment_ID = $comment->user_id; $author = get_comment_author( $comment_ID ); $url = get_comment_author_url( $comment_ID ); /* Check if commenter is registered … Read more

Comment Count for each Comment Author

Place this in your functions.php theme file: <?php function ps_count_user_comments() { global $wpdb; $count = $wpdb->get_var( ‘SELECT COUNT(comment_ID) FROM ‘ . $wpdb->comments. ‘ WHERE comment_author_email = “‘ . get_comment_author_email() . ‘” AND comment_approved = “1” AND comment_type IN (“comment”, “”)’ ); return $count . ‘ comments’; } ?> This code will count the author comments … Read more

How do I set up real anonymous posting in bbpress forums? [closed]

When we post an empty anonymous reply, we get the following errors: The part of BBPress that’s responsible for handling this, is the bbp_new_reply_handler() function, in the file /bbpress/includes/replies/functions.php. It contains these lines that are of interest to us: // User is anonymous if ( bbp_is_anonymous() ) { // Filter anonymous data $anonymous_data = bbp_filter_anonymous_post_data(); … Read more

Disabling Comment Notifications for Post Author

I skimmed through the source of the wp_notify_postauthor() function and noticed the comment_notification_recipients filter. I wonder if you could simplify your plugin to the following code snippet: <?php /** * Plugin Name: Disable comment/trackback/pingback notifications emails * Plugin URI: http://wordpress.stackexchange.com/a/150141/26350 */ add_filter( ‘comment_notification_recipients’, ‘__return_empty_array’, PHP_INT_MAX ); add_filter( ‘comment_moderation_recipients’, ‘__return_empty_array’, PHP_INT_MAX ); where we use an … Read more

Exclude comments from a WP_Query object?

Did you actually find a case where there are any real comments in the wp-query object after running a normal query? If you examine the code in class-wp-query.php, you should find that the comments field only is populated with comments when a “comments-feed” is being queried for. In normal operation, comments are not retrieved by … Read more