• Resolved Shobha2208

    (@shobha2208)


    Hi: (A follow up to my request in my previous topic on this support thread) …

    On my site I use the MC4WP free plugin to add a comment form tick box that is integrated with my Mailchimp list to add those who tick to be added to my Mailchimp list. But this generally adds ever commenter to my Mailchimp list, but does not selectively send subscribers to separate groups on my Mailchimp list.

    Elsewhere on my site Gravity Form have given me a code so that a hidden field in my forms allows segregation of subscribers to different Mailchimp groups based on capture of the post category on which the form is placed.

    I had asked if such a thing can be done for MC4WP also so that if a person comments on a post and also ticks the box to subscribe to my mailing list, the category of the post is captured and the person is added to the correct Mailchimp list group?

    You replied me with some code changes links, but being a non-techie I am not able to adapt the code myself.

    Could you please give me the exact code to achieve my requirements and tell me where to paste this code?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey @shobha2208,

    I apologize for the delay in replying.

    Please find a code example to add users added to MC via comment form to an interest group.

    add_filter( 'mc4wp_integration_wp-comment-form_subscriber_data', function( MC4WP_MailChimp_Subscriber $subscriber ) {
    	$subscriber->interests[ "ccf0636978" ] = true;
    	return $subscriber;
    });

    You can modify this code for other uses.

Viewing 1 replies (of 1 total)
  • The topic ‘Regarding code to connect comment tick boxes to Mailchimp groups’ is closed to new replies.