Hi there,
Yes, in the premium version you can select “Lists Choice” from the “Add MailChimp field” dropdown select which will generate the HTML for a list of checkboxes, allowing the user to select which list(s) to subscribe to.
This is also possible with the lite version but not without adding some custom code to your theme its functions.php file and some more to generate the correct list HTML.
Hope that helps!
Quote: “This is also possible with the lite version but not without adding some custom code to your theme its functions.php file and some more to generate the correct list HTML.”
Is there any resource information on how to do this somewhere? Sorry if I have missed that so far.
Thanks!
Adding them consists of multiple steps.
1. Add HTML to your form where users can select the lists to subscribe to. The HTML should send the List ID’s to your server.
<label><input type="checkbox" name="lists" value="af123b13" /> List 1</label>
<label><input type="checkbox" name="lists" value="fa312b41" /> List 2</label>
(You can find your List ID’s in your MailChimp list settings
2. Use the mc4wp_lists filter to use the posted list values as the lists to subscribe to.
function myprefix_mc4wp_lists( $lists ) {
if( isset( $_POST['lists'] ) ) {
$lists = $_POST['lists'];
}
return $lists;
}
add_filter( 'mc4wp_lists', 'myprefix_mc4wp_lists' );
Hope that points you in the right direction.