How To Permanently Keep The Subscription Checkbox Checked in Subscribe To Comments WordPress Plugin

June 13th, 2009

Subscribe to comments is one of the best plugins, every wordpress user must have on their blogs in order to build interactivity. You can download the plugin from here.

Earlier, there was an option to permanently keep the subscription checkbox checked, but it is not available any more. With simple modification to the plugins code, you can get this feature back.

There are fair number of people who support keeping the checkbox checked permanently by default and then those who think its a bad idea to keep the checkbox checked permanently.

Tip for those who do not want to keep the checkbox checked always :

Under normal conditions, if you call the plugin hook after the comment box, the subscribe checkbox may go unnoticed as it is placed after the message text box. To avoid this, you can place the subscription checkbox after the website box and before message text area, this will the user an opportunity to decide if he wants to be subscribed to that post or not.

Here’s how you can achieve it :

1> Go to comments.php
2> Find this line

<label for=”url”><small>Website</small></label>

or something similar if you are using any custom comments plugin

3> Call the subscription checkbox hook right after it

<p> <?php show_subscription_checkbox(); ?> </p>

Now the subscription option will be available right after the website option like this :

How To Permanently Keep The Subscription Checkbox Checked in Subscribe To Comments WordPress Plugin

Here’s how you can have the subscribe to comments checkbox checked aways :

1> Go to plugin editor and open subscribe to comments plugin

2> Find the line :

<input type=”checkbox” name=”subscribe” id=”subscribe” value=”subscribe” style=”width: auto;” <?php if ( $checked_status ) echo ‘checked=”checked” ‘; ?>/>

3> Replace it with

<input type=”checkbox” name=”subscribe” id=”subscribe” value=”subscribe” style=”width: auto;” checked=”checked” />

4> Save the changes and your checkbox will always be checked.

Be Sociable, Share!

Author: Categories: How To's Tags:
  1. September 9th, 2009 at 01:07 | #1

    Thanks a lot for that. Worked like a charm. I’d thought I’d sidestepped the whole issue by never upgrading to 2.1.2, but upon checking, found the tickbox was still not checked by default.
    Just a quick FYI re. your post – people (like me :) ) may get confused when searching for the required lines to edit – your blog changed normal quote marks to smart quotes. So if you just copy’n’paste directly from your blog, the text won’t easily be found.
    Thanks again.

  2. October 22nd, 2009 at 18:49 | #2

    Thanks mate, I too was looking for the same, actually i didnt even notice when it was set to unchecked, i had set it to checked in past but seems that the upgrade to plugin changed the settings. It did effect the site visitors.


  3. December 9th, 2009 at 10:23 | #3

    this is test mail

  4. December 9th, 2009 at 10:23 | #4

    this is new test mail

  5. December 13th, 2009 at 16:06 | #5

    It worked fine… Thanks for the code..

  6. December 13th, 2009 at 16:11 | #6

    hey buddy it didnt worked for me.. does it require any additional settings for thesis??

  7. December 15th, 2009 at 11:08 | #7

    @Rajesh – Hmm I need to look into it. I guess in thesis there is a bit of difference .. like we need to make changes in the function file. May be will look in to it later n let u. Not possible at the moment as I’m travelling.

  8. January 3rd, 2010 at 20:04 | #8

    Replacing code isnt working for the latest release :(

  9. Infographiste PAO
    February 2nd, 2010 at 16:54 | #9

    Thanks for the tuto, it works well now

  10. October 21st, 2010 at 19:52 | #10

    The code works on the latest version. Just be sure to retype the quotation marks in the new code after you copy and paste this code. Works like a charm!

  11. March 8th, 2012 at 03:56 | #11

    WOW ! Worked for me :) Thanks a lot.

  1. No trackbacks yet.