Jump to content

Archived

This topic is now archived and is closed to further replies.

dreamsight

Captcha under comments field

Recommended Posts

dreamsight

http://fulfilmentwarehouse.co.uk/fulfilment-services/warehousingstorage/

 

Client wants a very basic captcha, which we've added. The problem is the captcha field doesn't sit under the comments box (above the button). I've gone through Wordpress help and been told to change the order or add

<?php comment_id_fields(); ?>
<?php do_action('comment_form', $post->ID); ?>

 

in the theme's comments.php

 

Where do I look in DMS?

Thanks

Share this post


Link to post
Share on other sites
Simon

There is no wordpress action to put anything between the comments box and the submit button.

 

DMS uses a basic comments.php that then calls the default comments_form() function in WP using the default settings.

 

So you can either use filters to change the form OR create a child theme and put your own comments.php in it. WP will use the child themes comments.php 1st.

Share this post


Link to post
Share on other sites
dreamsight

Thanks for getting back to me Simon, and oh! Do you know how I can get this in the right order on the page then?

Share this post


Link to post
Share on other sites
Danny

What do you mean the right order on the page ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
dreamsight

The captcha needs to be below the comments and above the button

 

screen-shot.png

Share this post


Link to post
Share on other sites
Danny

Well as Simon already said, there isn't a filter in Wordpress to do this, so you will need to create your own comments form. See here for some reference and also, this is specific to Wordpress so you will want to post this question on their support forums.

 

http://codex.wordpress.org/Function_Reference/comment_form


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
dreamsight

Hi Danny

It was the WP forums that say it's a theme problem. 

 

I've found this one http://wordpress.org/support/topic/captcha-showing-below-submit-button-in-comments?replies=4 but /wp-content/themes/dms/comments.php doesn't have the strings.

 

And this one http://wordpress.org/support/topic/captcha-before-submit-button?replies=4 

...but then I read the following on the plugin readme.txt

 

(WP3 series) WP3 has a new function comment_form inside of `/wp-includes/comment-template.php`. 

Your theme is probably not up-to-date to call that function from comments.php.
WP3 theme does not need the code line `do_action('comment_form'`... inside of `/wp-content/themes/[your_theme]/comments.php`.
Instead it uses a new function call inside of comments.php: `<?php comment_form(); ?>`
If you have WP3 and captcha is still missing, make sure your theme has `<?php comment_form(); ?>`
inside of `/wp-content/themes/[your_theme]/comments.php` (please check the Twenty Ten theme's comments.php for proper example)

 

the DMS doesn't have this in comments.php

Share this post


Link to post
Share on other sites
Danny

DMS doesn't have what in comments.php ?

The <?php comment_form(); ?> is here - http://d.pr/i/oLWh

 

So you just need to follow Simons instructions and create your own comments.php file in a child theme. I don't see how this is a theme specific when DMS uses a basic comments.php that calls the Wordpress comments form.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
dreamsight

Thanks for getting back to me. 

 

I was looking for <?php comment_form(); ?> using a search and it didn't pick up 

<?php endif; // check for comment navigation 

endif; // end have_comments()
comment_form(); ?>
 
I can see the SI CAPTCHA Anti-Spam puts the captcha in the same place on your screenshot (as well as in their screenshots), so I know it's WP and not pagelines. I'll have a go at building our own comments from then

Share this post


Link to post
Share on other sites
dreamsight

Thank you Simon, that's great

Share this post


Link to post
Share on other sites

×