Hey @ddhx5,
Thanks for reaching out to us.
This is possible with some custom code. You can use the following code to add the checkboxes for the user to select a list:
function myprefix_show_list_choice_in_buddypress() {
?>
<h4>Choose the lists you wish to subscribe to..</h4>
<p>
<label>
<input type="checkbox" name="_mc4wp_lists[]" value="id-of-list-1" /> List 01
</label>
<label>
<input type="checkbox" name="_mc4wp_lists[]" value="id-of-list-2" /> List 02
</label>
<label>
<input type="checkbox" name="_mc4wp_lists[]" value="id-of-list-3" /> List 03
</label>
</p>
<?php
}
add_action( 'bp_before_registration_submit_buttons', 'myprefix_show_list_choice_in_buddypress' );
You need to change the value to match the list ID.
Thread Starter
ddhx5
(@ddhx5)
Thank you!!
Can you help me, where should I paste it? Which file and which line? Is set up one checkbox with the plugin, need I set up only the second with this code?
Plugin Contributor
Lap
(@lapzor)
I recommend you use a plugin like https://wordpress.org/plugins/code-snippets/
Or put it in the functions.php of your child theme, if you use a child theme.
As always, make a backup of your site before adding any code!!