Title: Comments form problem
Last modified: August 22, 2016

---

# Comments form problem

 *  [tdsm](https://wordpress.org/support/users/tdsm/)
 * (@tdsm)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/comments-form-problem-3/)
 * Thanks for a great plugin… we’re using the Math Captcha everywhere and it works
   as expected however it doesn’t appear on the comments form.
 * We haven’t used a custom comment file, instead just calling
 * `comments_template();`
 * I’m definitely not logged in so can’t figure out why this wouldn’t work.
 * The site address is;
 * [http://www.ahsn-nenc.org.uk/](http://www.ahsn-nenc.org.uk/)
 * [https://wordpress.org/plugins/wp-math-captcha/](https://wordpress.org/plugins/wp-math-captcha/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/comments-form-problem-3/#post-5754143)
 * It should work ok.
    What are your MC settings?
 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/comments-form-problem-3/#post-5754147)
 * Nevermind. Whatever other settings you have it should be displayed.
 * The MC field is displayed using comment_form_after_fields action hook. Can you
   try to add something using this?
 * We’d now if you have this action fired in your comments form.
 *  Thread Starter [tdsm](https://wordpress.org/support/users/tdsm/)
 * (@tdsm)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/comments-form-problem-3/#post-5754159)
 * Looks like something isn’t playing nicely. If I add the following code, nothing
   appears…
 *     ```
       function my_comment_form_after_fields() {
       	echo "TESTING 1 2 3";
       }
       add_action('comment_form_after_fields','my_comment_form_after_fields');
       ```
   
 * If I add `do_action(comment_form_after_fields);` after `comments_template();`
   then the captcha and my “TESTING 1 2 3” both appear
 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/comments-form-problem-3/#post-5754160)
 * That’s the problem. This should be in the comments template already. Adding this
   after the form will not take any effect.
 * Your theme / plugins might be modifying this.
 *  Thread Starter [tdsm](https://wordpress.org/support/users/tdsm/)
 * (@tdsm)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/comments-form-problem-3/#post-5754220)
 * Ahhh, figured it out…
 * I was using `comments_template()`
 * Basically, if you don’t include a `comments.php` template in your theme, WordPress
   uses its own default template which does not seem to include the necessary actions(
   perhaps for backward compatibility) the plugin requires to hook into.
 * If you use `comment_form()`, the captcha works but this won’t display the comments
   list, so my solution was to create a very basic `comments.php` template and call`
   comments_template()`;
 *     ```
       <div id="comments">
       	<h2>Comments</h2>
       	<ol class="commentlist"><?php wp_list_comments(); ?></ol>
       </div>
       <?php comment_form(); ?>
       ```
   
 * Perhaps it would be useful to have some sort of documentation or ‘readme’ text
   to explain some of the prerequisites?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Comments form problem’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-math-captcha_2d554b.svg)
 * [Math Captcha](https://wordpress.org/plugins/wp-math-captcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-math-captcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-math-captcha/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-math-captcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-math-captcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-math-captcha/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [tdsm](https://wordpress.org/support/users/tdsm/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/comments-form-problem-3/#post-5754220)
 * Status: not resolved