Tutorial - ClassiPress Listings Update Subscription With Subscribe2 Plugin
I wish I could take credit for this, but I found it in the JobRoller forum. And I really thank pilotjobupdate for figuring it out and posting, so it is only fair that I do the same.
This involves visitors being able to subscribe to a list to receives updates of your classified listings according to the frequency you select.
First off Install the Subscribe2 Plugin on your Wordpress (
http://subscribe2.wordpress.com/ or through the add new plugin link): WordPress › Subscribe2 « WordPress Plugins
Next You will want to Configure Subscribe2 Per the authors instructions. Two ways to have a "Enter your e-mail to subscribe box" on your website. The First is to use a short code and plug it into a page, such as the About page. The second is to use a widget it the sidebar. Personally I prefer the widget.
Once Subscribe2 is fully configured it will by default sent e-mails for regular "Posts" but not "Ads." In order for Subscribe2 to e-mail your most recent Ads, you will have to copy and paste the exact following code into your 'Theme Functions' (functions.php, not the theme-functions.php in the includes directory) file. Be sure to paste the code beneath these lines:
/**
* add any of your custom functions below this section
*/
Here is the Code:
function my_post_types($types) {
$types[] = 'ad_listing';
return $types;
}
add_filter('s2_post_types', 'my_post_types');
Then save the file.
Thats It! You're done. However, please note that you will not see a Subscribe2 Dialog in the "New Ads" Section like you would in the "New Post" section. However, e-mails will be sent to your subscribers when you post new ads. You can test it by first completing the information in the "Subsribe2" setting, then clicking the "Send Email Preview" button within the settings page. Or you create a listing then check you email.
I hope this helps someone!