Got some idea from here.
User’s comments have posted
<?php
function commentCount() {
global $wpdb;
$count = $wpdb->get_var('SELECT COUNT(comment_ID) FROM ' . $wpdb-comments. ' WHERE comment_author_email = "' . get_comment_author_email() . '"');
echo $count . ' comments';
}
commentCount();
?>
I don’t have any idea for comments that user got from their posts. Might be use custom $wpdb
query too, where post_id is array of their post id.
Related Posts:
- Commenter should see only his comments in wordpress
- wp-comment author- url +, email filter hook
- Use author author display name in permalink structure for pages and posts
- Possible to search by author name with default WordPress search function?
- Remove Comments Metabox but still allow comments
- Add admin bar link to edit author
- How can I remove the title “leave a reply” in the comment box in twentyeleven?
- change the comment time output to: X time ago instead of actual date and time
- How to get comments with mixed status using get_comments?
- How to prevent deleting of comments when deleting a post
- disable comments if array exists
- Authors details such as social media links, emails etc → Is this Meta or something else?
- Remove “says” from comments
- Comments to only be seen by their author
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Hide Author.php template from specific user role
- How to automatically remove links from WordPress Biographical Info?
- Show top commenters without using a plugin
- Change the HTML of the comment form that is generating somewhere from the core WordPress
- Allow Post Author to be 0 on Update
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- check if author has published posts in custom post type, then send mail
- Where to add the permalink in this function?
- Incorrect redirect after commenting
- comments_popup_link without echo?
- Getting comment count per post not working
- Wp admin – Set default value to 999 in comments
- What is the Difference in bones_comments() and comments.php
- Author Date Function not working as expected [duplicate]
- Disabling Author Page only for subscribers
- Function to replace comment’s accented characters before posting
- If no author posts, echo out some text
- WordPress comment_form() does not display actual comments
- WordPress comment processing . Default unapproved comments detection before posting
- how to show comments only author which send own posts in wordpress
- How do I change where “You must be logged in to comment” directs users?
- Show all people who commented on all posts by an author
- How do I make the comment disappear after deleting from the database?
- Get post_author email for Zapier Integration
- Remove nofollow from internal comment links via functions.php
- Author social media aren’t shown on the page
- How can I automatically delete comments that contain a URL?
- Warning and fatal error
- How To Display Author Popup on Entry Meta (Genesis Framework)?
- Comment function for page
- How to identify author in wordpress comments?
- Author Page User id in functions.php for non login user
- How can I return the result of my custom function?
- Newest comments first not working
- get_comments not working properly after WordPress v4.4 update
- Author info does not show up when author has no posts
- Getting error while trying to use custom comment function
- Increase Comment Author Gravatar Size On WordPress Default Comment Function
- Show the online status of the current post’s author
- Custom Nested WordPress Comments with avatar
- Undo a function that is not (seemingly) hooked to an action?
- Comment Function
- WP Custom Comment Callback Not Responding
- How to remove “login to reply” from individual comments [duplicate]
- How to Insert A List of Posts in A Category Written by the Author into the Author Archive
- Getting full code of wp_list_comments instead of replacing it
- Comment turned Invisible
- User’s Comments Number: Storing it in a meta field for different uses
- Add functionality to block comment authors in the Comment edit pag
- How to add user_registered time in human_time_diff() wordpress
- comments_template() doesn’t work with ajax call
- Include posts under a custom taxonomy in author.php
- How to use: WP_AJAX_GET_COMMENTS
- WP backend, Show only own comments (give to users who wrote/published/assigned) posts
- How to display this meta data (an array) in form of a function (created with a custom write panel)?
- How to implement a WordPress comments function?
- WordPress – using sessions?
- Need To Resize Images Exactly Without Losing Image Details
- Problem with shortcode inside a shortcode
- Different profile page by role
- How to add or delete default value theme options while activate and deactivate theme
- Echo youtube code from url or shortcode
- Removing WPML Items From the WordPress Admin Bar
- Display ACF category image on archive and single template files
- Get URLs for AJAX Filter Checkboxes WordPress
- How to get taxonomy tree ids without running expensive loops
- Message notification for user
- Get slug of current category in functions.php
- wordpress built-in Jalali date convertor
- Disable autosave with `function.php` for custom post wordpress?
- sort metabox columns in listing Single
- WordPress login set cookie that survive browser exit (wp_signon function)
- wp_nav_menu displaying all pages
- WordPress 6.0 upgrade caused my custom function to stop working
- How to change the author box selection on a post to a custom taxonomy
- How to avoid saving empty data to sql while using add_meta_box
- How to assign php file(template) to several pages with same prefix page name/slug
- How to Display WooCommerce Product Price in WooCommerce Archive
- How to change text color depending on the number value (Using javascript)
- is_main_query() always returning false
- Woocommerce Variable Product Dropdown for Custom Shop Template
- Is this a backup door?
- Create Custom URL structure for specific Post category using Post ID instead of post name
- Include widget file in functions.php of child theme
- Astra theme – cannot set short product description under the product title (product name)