Mailchimp script to connect a site

Hi,
I want to connect my site with Mailchimp and was wondering where should I place the script. I’ve read instructions from Mailchimp and they say to place it in header.php before the closing (body) tag but I don’t see it inside header.php.
Can you please advise me. I’m using the pro-child theme.

Thanks and regards,
Anita

Hi There,

Thanks for writing in!

You can load the script via function file of child theme. Here is a example code for you.



/**
load mailchimp script in header
*/
add_action( 'wp_head', 'my_header_scripts' );
function my_header_scripts(){
  ?>
  //<script>Your script goes here</script>
  <?php
}

Hope this helps!

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.