允许多个列表的时事通讯插件?

时间:2012-07-03 作者:mysterious

我尝试了一些插件(wysija、时事通讯、xyz时事通讯),但到目前为止没有一个插件满足我的要求。

我想要的是每个页面都有一个注册表单,然后根据他们注册的页面将注册者添加到不同的列表中。

我正在寻找高级或免费的插件,并且希望避免使用第三方解决方案。

1 个回复
SO网友:brasofilo

我相信你可以用任何插件解决这个问题。。。

按代码使用Wysijaexample:

if ( is_page( array( 42,\'about-me\',\'Contact\' ) ) )
{
    $widgetdata=array (
       \'widget_id\' => \'wysija-nl-php-1\',//form identifier important when many subscription forms on the same page
       \'title\' => \'Subscribe to our Newsletter\',//title of widget
       \'instruction\' => \'To subscribe to our dandy newsletter simply add your email below. A confirmation email will be sent to you!\', // instruction to be displayed on top of the widget
       \'lists\' =>  array (0 => \'1\'), //array of list_id to which you want to subscribe your users
       \'submit\' => \'Subscribe!\',//name of the subscribe button
       \'success\' => \'You’ve successfully subscribed. Check your inbox now to confirm your subscription.\',//success message returned when registered
       \'customfields\' =>array ( //optional array of custom fields to be displayed lastname, firstname, email
            \'firstname\' => array (\'column_name\' => \'firstname\',\'label\' => \'Prénom\'),
            \'lastname\' => array (\'column_name\' => \'lastname\',\'label\' => \'Nom\'),
            \'email\' => array (\'label\' => \'Email\')
       ),
       \'labelswithin\' => \'labels_within\' //parameter to put the label of the custom field as a default value of the field
    );

    $widgetNL=new WYSIJA_NL_Widget(1);
    $subscriptionForm= $widgetNL->widget($widgetdata,$widgetdata);

    echo $subscriptionForm;
}
else
{
    $widgetdata=array ( /* ANOTHER SETTINGS ARRAY */ );

    $widgetNL=new WYSIJA_NL_Widget(2);
    $subscriptionForm= $widgetNL->widget($widgetdata,$widgetdata);

    echo $subscriptionForm;
}
通过widget将新闻稿与Widget Login: enter image description here

结束

相关推荐

WP can't send newsletters

我正在使用ALO EasyMail新闻稿插件向订阅者发送新闻稿。我有设置,主要是电子邮件地址,并试图为订阅者发送电子邮件,但它不发送任何东西。wordpress有什么特殊的配置吗?谢谢

允许多个列表的时事通讯插件? - 小码农CODE - 行之有效找到问题解决它

允许多个列表的时事通讯插件?

时间:2012-07-03 作者:mysterious

我尝试了一些插件(wysija、时事通讯、xyz时事通讯),但到目前为止没有一个插件满足我的要求。

我想要的是每个页面都有一个注册表单,然后根据他们注册的页面将注册者添加到不同的列表中。

我正在寻找高级或免费的插件,并且希望避免使用第三方解决方案。

1 个回复
SO网友:brasofilo

我相信你可以用任何插件解决这个问题。。。

按代码使用Wysijaexample:

if ( is_page( array( 42,\'about-me\',\'Contact\' ) ) )
{
    $widgetdata=array (
       \'widget_id\' => \'wysija-nl-php-1\',//form identifier important when many subscription forms on the same page
       \'title\' => \'Subscribe to our Newsletter\',//title of widget
       \'instruction\' => \'To subscribe to our dandy newsletter simply add your email below. A confirmation email will be sent to you!\', // instruction to be displayed on top of the widget
       \'lists\' =>  array (0 => \'1\'), //array of list_id to which you want to subscribe your users
       \'submit\' => \'Subscribe!\',//name of the subscribe button
       \'success\' => \'You’ve successfully subscribed. Check your inbox now to confirm your subscription.\',//success message returned when registered
       \'customfields\' =>array ( //optional array of custom fields to be displayed lastname, firstname, email
            \'firstname\' => array (\'column_name\' => \'firstname\',\'label\' => \'Prénom\'),
            \'lastname\' => array (\'column_name\' => \'lastname\',\'label\' => \'Nom\'),
            \'email\' => array (\'label\' => \'Email\')
       ),
       \'labelswithin\' => \'labels_within\' //parameter to put the label of the custom field as a default value of the field
    );

    $widgetNL=new WYSIJA_NL_Widget(1);
    $subscriptionForm= $widgetNL->widget($widgetdata,$widgetdata);

    echo $subscriptionForm;
}
else
{
    $widgetdata=array ( /* ANOTHER SETTINGS ARRAY */ );

    $widgetNL=new WYSIJA_NL_Widget(2);
    $subscriptionForm= $widgetNL->widget($widgetdata,$widgetdata);

    echo $subscriptionForm;
}
通过widget将新闻稿与Widget Login: enter image description here

相关推荐

WP can't send newsletters

我正在使用ALO EasyMail新闻稿插件向订阅者发送新闻稿。我有设置,主要是电子邮件地址,并试图为订阅者发送电子邮件,但它不发送任何东西。wordpress有什么特殊的配置吗?谢谢