Your action is called whenever comments.php
loads because you’re explicitly running it with do_action
. Both the function and add_action
should be in functions.php
, and do_action
should be removed entirely.
Related Posts:
- How to wrap submit button of comment form with div
- customize comment form
- How to make comments private for commentor and post author
- Name of comment field differs on different sites
- How can I embed comments plugin to my own website?
- Custom comment field not showing when logged-in
- How to display replies to his comments in user profile of current user
- 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?
- reply to comment excerpt instead of author in comment title
- Display Comment Form on dedicated Page for each post
- Commentform – Hightlight invalid fields instead of prompting towards error page
- How to rearrange fields in comment_form()
- Removing the “Website” Field from Comments and Replies?
- How to add a class to the comment submit button?
- How to display comment form error messages in the same page
- How can I limit the number of comments per registered user per day?
- Deep customization of the comment form?
- How to hide “Trackback” on paginated comments
- Why are default comments deprecated?
- Comments Reply Form
- Does WordPress Allow Blank/Empty Comment Submissions In WordPress?
- Comment form not showing up without comments
- How can comments be submitted when I don’t have a comment box on a page?
- how to have 2 comments_template() in one post
- Custom Field Added In Comment Form Not Showing In Edit
- Add a drop down list to comment form?
- How To Remove The “Click here to cancel reply” Link From The WordPress Comment Form
- Making a Comment on a page without being on that page?
- adding a text message beside the comment submit button
- How to get last comments but not from admin (or other specific user role/capability)?
- How to save new comment as custom comment type?
- WP comments form (custom) is displaying an extra comment field
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, func
- How to add consent checkbox in comment section
- How to add enctype to multipart/form-data to comment form?
- Changing position of cancel_comment_reply_link and other elements of comment form
- What does the “$depth” parameter in the Walker_Comment stand for?
- Publish a message on facebook after having posted a comment
- Edit Comment_Field while using T5 Comment Textarea On Top-Plugin
- Share comment to twitter after publishing [closed]
- Disable comments
- Comment form connection to Gravity Forms
- Add classname comment template from functions.php
- Auto-fill Custom comment fields
- The comment login form is visible to me but not to the user
- Change order of comment fields
- Create comments.php form of custom HTML code
- How can I convert anonymous commenters into registered users?
- Add class to comment form div when comment-reply button is clicked
- To whom do emails get sent via the WordPress comments form?
- how to properly use comments-template.php
- customizing TwentyEleven comments template
- Display complete comment section via post ID
- WordPress comments – how to check if comment still needs to be approved?
- Assign author to comment from post edit page
- How to retain comment text on comment form after login/registration?
- Modify WordPress Comment From For AMP Html
- Check if comment was successfully submited
- comments_number not displaying
- Why could my comment_form variable not be working?
- The comment could not be saved. No comment_ID on comments
- comment_notes_before not working
- Add comment_meta to wp_comment_reply
- How to create post comment from different domain
- Comments on future posts
- Returning error upon comment being flagged as spam
- How to filter comments by comment_meta
- Changing the Comment Fields using Filter (without success)
- Custom sort comments with select form
- Edit Comments Fields
- Upload avatar for post comment
- Comment author profile image
- Top rated posts Average rating issue
- Comment Form Fields when user logged in
- Author name length character limit?
- Check if comment author has url
- Removing(replacing) avtar in comments.php with some other HTML arrangements
- WordPress Commenting System User access and Security
- Comments.php is not getting called on main blog page
- How to enable truly anonymous posting in bbPress forums? [closed]
- Comment section not appearing on posts
- How to change comment-page-1#comment-25 to any string?
- Increase Comment Author Gravatar Size On WordPress Default Comment Function
- Comment form – different title if no comment yet
- WordPress Comments jQuery Doesn’t submit
- Insert comment and still use moderation
- Need an advice about comments
- How to remove website field in comment form?
- Auto approve all comments (editor)
- Actual comments not showing, but form is?
- add field comment [duplicate]
- How to remove or customize “Comment” in comments form?
- How do I convert users who put an email and username for a comment into registered users? [duplicate]
- Outputting complete custom comment form
- Clicking Comment “Reply” Button only replies to first comment
- Is there a Function so that the author of the comment can delete his own comment?
- The last comments of a post for the author of that post