WordPress.org

Ready to get started?Download WordPress

Forums

ALO EasyMail Newsletter
Add user to different mailing list according to registration page (4 posts)

  1. globalreporter
    Member
    Posted 1 year ago #

    Hi!
    I'd like that when a user subscribe the newsletter in a certain post of my blog, he is automatically added to a specific mailing list according to the post he is reading: different post, different mailing list.
    I know I could let the user choose which mailing list can subscribe, but I'd like to make the subscription process more friendly.
    A solution could be to load the post page with the relevant mailing list tick box already ticked.
    Can you help me to do it? or any other ideas to have the same result?
    Thank you very much! :)
    Rocco

    http://wordpress.org/extend/plugins/alo-easymail/

  2. globalreporter
    Member
    Posted 1 year ago #

    It's maybe something like adding the below code in custom-hooks.php, but make it working differently according to the page on which the user subscribe.......?

    function custom_easymail_auto_add_subscriber_to_list ( $subscriber, $user_id=false ) {
    	$list_id = 1; // put the ID of mailing list
    	alo_em_add_subscriber_to_list ( $subscriber->ID, $list_id );
    }
    add_action ( "alo_easymail_new_subscriber_added",  "custom_easymail_auto_add_subscriber_to_list", 10, 2 );

    from: http://www.eventualo.net/blog/easymail-newsletter-for-developers/#tutorial-autoaddtolist

  3. estepix
    Member
    Posted 1 year ago #

    Hi, did you ever got this working? If so, I'd appreciate if you could share your wisdom ;)

  4. eventualo
    Member
    Plugin Author

    Posted 1 year ago #

    The following function adds the subscriber to a mailing list related to current post. You can use more template tags to make it better.

    Please remember that you have to create all mailing lists and maybe mark their visibility as "Admin side only" in plugin settings.

    http://pastebin.com/C8R6T3tD

    I've not tested it but it should work... Let us know.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic