Skip to main content

Quick Tip: WordPress and Campaign Monitor

Just a quick and easy way to integrate your campaign monitor list.

Adding a subscribe form to your site

The easiest way, is to use the WordPress text widget, and then paste in the campaign monitor built form code into it. To get a form, go to your list in campaign monitor, and click "Grow your audience". Next, click "Copy/paste a form to your site". Select the list(s) that you want, and then click generate code.  This will provide the form code to put into your blog. You can later customize the settings like confirmation, thank you note, etc.

E-mail subscribers

When this post was first typed out, the "automation" functionality was not yet in Campaign Monitor. Integrating with automation is the suggested way to include into WordPress. Its using the Campaign monitor directly, and you are not adding bulk to your theme files and site.

Campaign Monitor automation

The Automation functionality in Campaign Monitor can read and parse RSS feeds. First, make sure to add the "RSS to Email" tags into your template, and create your list (as you normally would). Next follow Campaign Monitor's guide for email automation, using the list and template mentioned earlier. That's it!

No RSS/Atom feed

Add the Campaign Monitor Wrapper for PHP into the themes directory for you to be able to access the functionality. Next, use the "create a draft campaign" and "Sending a draft campaign" to send an email. This code should go into your functions.php file like below:

// be sure to require once the API wrapper.
function email_alert() {
    //campaign monitor code
add_filter ( 'publish_post', 'email_alert' );

Integrating with other languages and systems

For the most part, the instructions would be similar. Though, may need to choose a different API Wrapper for the language you will be using (if you are not using an atom/rss feed).