Add a Blog Post to Any Campaign

This feature requires Author user level or higher.

With MailChimp's feed tags, you can add blog posts from your RSS feed to any type of campaign. Subscribers can read and interact with your blog content without going to your website. For example, you might want to add a sidebar to your campaign that shows recent blog posts.

Use feed tags to add blog posts to Regular, Plain Text, A/B Test, or Multivariate Campaigns, or Automation workflows. If you want, use a feed tag in an RSS Campaign to embed content from more than one blog’s feed.

In this article, you'll learn two ways to use merge tags to add blog content to any type of campaign.

Before You Start

Here are some things to know before you begin this process.

  • Make sure you’re familiar with merge tags.
  • If you need to add content from more than one blog to your campaign, use an extra feed merge tag or feedblock for each blog you add.

Definitions

  • Feed Merge Tag
    A tag that automatically adds blog content to any type of campaign. Use a feed merge tag if you need a fast way to add blog content to a campaign.
  • Feedblock
    A collection of feed tags that you put together to designate how many blog posts to display and which RSS feed elements to include in a campaign. Use a feedblock if there are certain parts of your feed that you want to highlight or hide, or if you need more tools to customize the way your posts look.
  • RSS Merge Tags
    Merge tags that add blog content to your RSS Campaign. Unlike feed merge tags, RSS merge tags don’t work in other types of campaigns. 

Insert the Feed Merge Tag

The quickest way to add blog content to your campaign is to use a feed merge tag.

To use the feed merge tag, follow these steps.

  1. Navigate to the Design step of the Campaign Builder.
  2. Click the text content block where you want to add your blog posts.
  3. Type this tag in the editing pane.
    *|FEED:http://www.example.com/blog/feed/[$count=#]|*
    There are also additional variables you can place in the brackets to customize your blog content.
  4. Replace the example URL with your feed’s URL, and replace # with the number of posts you want to show in the campaign.
    A screenshot of a feed merge tag in the editing pane of the campaign builder.
  5. Click Save and Close.

We recommend you preview and test your campaign to see what your blog content will look like for subscribers.

Additional Variables

Add extra variables to the brackets in your feed merge tag to tell MailChimp what to display, and how to format your blog posts.

  • $count=2
    Indicates how many blog posts to show in the campaign. Replace the "2" with your preferred number.
  • $content=full
    Tells the feed to display the full blog post, including images.
  • $content=titles
    Tells the feed to display the titles of each entry only, formatted as links.
  • $constrain_rss_img=Y
    Resizes the images in your feed to fit the width of your template. It's important to use a capital Y.
  • $category=xyz
    Displays only the posts in a certain category of your RSS feed. Replace “xyz” with the category you choose.

Examples of Feed Merge Tags

If you need ideas for what variables to include in your feed merge tag, take a look at these examples. Be sure to replace the example feed with your feed’s URL.

Example 1

This example feed merge tag shows links to the two most recent posts from MailChimp’s blog, showing only the titles.

*|FEED:http://www.mailchimp.com/blog/feed/[$count=2,$content=titles]|*

A screenshot showing what the example screenshot looks like in preview mode.

Example 2

This example feed merge tag shows the summary of two recent posts from a specific category in the MailChimp blog RSS feed.

*|FEED:http://www.mailchimp.com/blog/feed/[$count=2,$category=MailChimp News]|*  

An example of what the feed merge tag looks like in preview mode.

Create a Feedblock

For more control of the blog content that is pulled into your campaign, use a feedblock. You’ll add opening and closing feedblock tags, and place additional feedblock tags in between those tags to tell MailChimp what to display.

To create a feedblock, follow these steps.

  1. Navigate to the Design step of the Campaign Builder.
  2. Click the text content block where you want to add your blog posts.
  3. Type *|FEEDBLOCK:URL|* in the editing pane to open the feed section of your campaign.
  4. Replace URL with your RSS feed's URL.
  5. Enter feed item tags to specify the content you want to include for each blog post, like the title, author, or image URLs.
  6. At the end of the content tags, enter the closing tags *|END:FEEDITEMS|* and *|END:FEEDBLOCK|*.
    An image that shows how to input a feedblock into the Design Step of the Campaign Builder.
  7. Click Save and Close.

We recommend you preview and test your campaign to see what your blog content will look like for subscribers.

Feedblock Examples

If you need ideas for what feed item tags include in your feedblock, take a look at these examples. Be sure to replace the example feed with your feed’s URL. ‚Äč

Example 1

This example feedblock shows titles of the two most recent posts from a feed, a text content summary for each blog entry, and social share icons for each post.

*|FEEDBLOCK:http://blog.mailchimp.com/feed|*

*|FEEDITEMS:[$count=2]|*

*|FEEDITEM:TITLE|*

*|FEEDITEM:CONTENT_TEXT|*

*|FEEDITEM:SHARE:Facebook,Twitter,Digg|*

*|END:FEEDITEMS|*

*|END:FEEDBLOCK|*

A screenshot of a feedblock in preview mode.

Example 2

This example feedblock shows the title of one recent blog post from the feed, along with an image, the post URL, the author, and the post date.

*|FEEDBLOCK:http://blog.mailchimp.com/feed|*

*|FEEDITEMS:[$count=1]|*

*|FEEDITEM:TITLE|* by *|FEEDITEM:AUTHOR|*

*|FEEDITEM:URL|*

*|FEEDITEM:IMAGE|*

*|END:FEEDITEMS|*

*|END:FEEDBLOCK|*

A screenshot of a feedblock in preview mode.

Was this article helpful?
What can we do to improve articles like this?

Technical Support