You could pull all of the comments by current user and loop over them to see how may where today or you can create a custom sql Query to select just the count of comments for the last 24 hours, something like this:
global $wpdb,$current_user;
$sql = $wpdb->prepare("
SELECT count(*)
FROM wp_comments
WHERE comment_author="%s"
AND comment_date >= DATE_SUB(NOW(),INTERVAL 1 DAY);"
,$current_user);
$count = $wpdb->get_results($sql);
Related Posts:
- How to wrap submit button of comment form with div
- Showing comments only to same custom user role
- How to hide “Trackback” on paginated comments
- how to have 2 comments_template() in one post
- Passing arguments to wp_list_comments callback function
- customize comment form
- comments_template not working correcly in custom template files
- How can I show comments in random order?
- How to get last comments but not from admin (or other specific user role/capability)?
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, func
- Comments view limited to 20 results – any way to increase to 50 or 100?
- What does the “$depth” parameter in the Walker_Comment stand for?
- Add classname comment template from functions.php
- Customizing comments pagination for bootstrap
- How to limit comment author to one comment per post
- comment_post action hook running on page load instead of after a comment is posted
- using comments_template() in custom single-portfolio.php
- how to properly use comments-template.php
- WordPress comments – how to check if comment still needs to be approved?
- Modify WordPress Comment From For AMP Html
- Adding character count and limit in comments, modifying labels and fields – jetpack
- comments_number not displaying
- How to make comments private for commentor and post author
- Name of comment field differs on different sites
- The comment could not be saved. No comment_ID on comments
- How to display comment meta under each comment content
- How can I embed comments plugin to my own website?
- Custom comment field not showing when logged-in
- Custom comment link
- How to display replies to his comments in user profile of current user
- How to show a list of comments on home page from all posts?
- reply comment below the comment box without reload page
- How to call out the date of user’s first comment?
- How to pass settings to comment_form() if theme only uses comments_template()?
- How to add a class to comment submit button?
- How Can I display the Current Logged-In User’s Comment at the Top of the Comments Section in WordPress?
- Comments page id wp_list_comments
- reply to comment excerpt instead of author in comment title
- Redirect first time comments
- How to maintain changes to comment-template.php
- Display Comment Form on dedicated Page for each post
- Commentform – Hightlight invalid fields instead of prompting towards error page
- Auto approve all comments (editor)
- The last comments of a post for the author of that post
- comments reply script not working
- What should I do to make generated avatars different for anonymous comments?
- Check If comment author is registered
- Running a function on comment status change
- Completely disable comments
- Customize reply form different to comment form
- WP_Comment_Query with 5 top level comments per page?
- WordPress admin bar showing pending comments which cannot be selected or modified after deleting parent page
- Get only one comment per post with get_comments
- What is the correct/safe way to delete all comments?
- Setting comment text as required
- Draft / schedule comments?
- How to insert Comment metadata via REST API
- How to remove these comments and html tags from the content?
- How to create a link to jump to “Leave a comment” part?
- Opening all posts for comments
- Unix timestamp for post comment
- In wp_list_comments(), what is a short_ping?
- Check if someone recently commented in one of my posts
- How to query comments only for the current post?
- Sync comment data
- Comment displaying full name even after setting another display name?
- How to move comments box above comments
- Ability to leave comments broken
- How to disable comment flood temporarily in a single scope
- How to create a seperate commenting system?
- Change how many approved comments must user have
- Only admin can see comments on post or page
- Display Custom comments field number
- Trying to post a wordpress comment on my site redirects to 127.0.0.1
- Best way to tell if a comment is from a user?
- Make user’s name display as the site name in comments if it matches certain roles
- Display avatar with comment form?
- Embedding Youtube video on comments
- Adding SQL source code to comments
- How to control size of comments popup window?
- Sent comments notifications to multiple users
- Applying same style to all the comments on the page
- Customise Comment form
- assumed as comment line
- Return count for characters in the comment and perform action based on the length
- How to load new posts from wordpress db into wordpress homepage without refreshing the site?
- comments.php remove date/time’s #hyperlink
- comment just attachment .. reply just text … can I do that?
- How to prevent users/authors from seing IP/email of new commentators?
- edit comments in front end
- How to replace anonymous comment form with a registration form on wordpress?
- I have tried using Plugins to remove 72K comments with no success
- How to get the 5 most recent comments and each comment 5 most recent replies (children)
- comment files and s
- Disqus moderation page not working in WordPress admin section
- Comment forum to display under the comment you’re replying too
- Recent comments per tagged post?
- Subscribe to a post’s comments without posting a comment yourself
- How to hide the login / profile urls on top of comment box for a post
- Why default comment fields don’t show up?