WordPress Live Comment Preview
I’ll keep this as short as possible. I’ve been utilising the wordpress live comment preview plugin on my site for a few months now but since my redesign I haven’t been able to get it working again. I don’t think that I’m too far away from getting this to work as I haven’t changed the code I was using when it was working previously.
One thing I cannot get my head around is the fact that the comment preview works perfectly when I’m logged in and posting a comment through the form as usual. But as soon as I log out the preview stops working. Immediately you might be thinking that this will be down to my comment preview tag being outwith the wordpress loop but after checking several times I’m postive that this new form follows exactly the same layout as my older one. Besides, the comment live preview installation file clearly states that you can call the preview anywhere as long as you use the appropriate php tag.
I’ve tried fiddling about with a few parts of the plugin and my own comments.php file but because my knowledge of php is still somewhat limited I’m not entirely sure if what I’m editing is correct, it’s all a bit hit and miss. Hopefully someone out there will have had the same problem as me or will know how to fix it.
I’ve stuck up this query on the wordpress forums but as yet I’ve had zero replies, which is more than a little disappointing. I also decided to email the plugin developer but again I’ve received no response, he probably gets alot of questions and in truth I never expected a reply anyway.
<form action="#" method="post" id="commentform">
form fields and textareas appear here
</form>
<section id="form-extras">
<section>
Comment Preview
<?php do_action('comment_form', $post->ID); ?>
</section>
</section>
If you liked this article then please feel free to Tweet it