One of my favorite Wordpress plugins [hands down] is Subscribe to Comments by Mark Jaquith and Jennifer (ScriptyGoddess). The plugin allows readers to subscribe to comment activities via email bypassing the need to bookmark or subscribe [via RSS] to particular posts. As with any well written Wordpress plugin, installation is a simple two step process: upload & activate. Done deal. The plugin automatically inserts a new “Subscribe to comments via e-mail” option conveniently located below the “Submit Comment” button in your comments.php template.

Personally, I believe the option placement is a little backwards. Why offer the option to subscribe via email below the submit button? Naturally, after typing a response, my immediate inclination is to click “Submit Comment” without taking notice of anything else in the area. I recommend repositioning the option directly below the comment textarea and immediately above the “Submit Comment” button. Doing so will allow a readers eyes to naturally pass from the textarea, to the option, and finally down to the button. Thankfully, we’re dealing with a Wordpress plugin which allows the average user to extract the necessary information from the plugin itself.
Assuming you’ve downloaded and unzipped the plugin, let’s open the subscribe-to-comments.php file in the plain text editor of your choice. The only string of text we’re interested in is located on line 25:
function show_subscription_checkbox ($id='0') {
Highlight show_subscription_checkbox and copy to your clipboard. Next, we’re going to specify where we want the option to appear for regular readers. Feel free to insert the option wherever you see fit. For this particular tutorial, we’re going to add the option directly below the comments textarea (and immediately above the “Submit Comments” button. So, let’s open up comments.php
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<?php show_subscription_checkbox(); ?>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
Recognize the show_subscription_checkbox? You have now repositioned the subscription option from the default to it’s new home. It is essential that the call be somewhere within the Wordpress loop.
.subscribe-to-comments {}
If you feel like styling the comment subscription option, keep in mind that the output is wrapped in <p> tags.























8 Comments
Quote
Excellent stuff. I never really thought about it but you are right it could be missed. BTW, it is one of my favorites also.
Quote
Heh, I did this fix on my site and never really gave it a second thought. It’s a good thing you’ve provided this tutorial to anyone who is thinking of using the plugin; the option definitely should go before the button.
Quote
I have really got to try this plugin. Maybe this will get me to sort out the mess that is my comments section.
Quote
Very nice tutorial.
I don’t like the default placement either. Unfortunately, in the “default” and “classic” WordPress themes, and in many other themes, the “hook” that Subscribe to Comments uses is placed below the “submit” button. The main use of the hook is to insert extra form elements, and I can’t imagine why you’d want the form elements to be under the submit button.
Instead of placing the
show_subscription_checkbox();call manually, you could also move the comment form hook up to the desired location. That way any other plugins that use the hook will also be able to place their form elements above the submit button.Quote
A very helpful post, thanks.
Incoming Links
Leave a Reply