• Home
  • Contact
No Result
View All Result
Blogs
  • Home
  • Contact
No Result
View All Result
Blogs
No Result
View All Result

Mailchimp: Building A Custom Feed In WordPress For Your RSS-to-Email Campaign

admin by admin
July 21, 2023
in Marketing Automation
Share on FacebookShare on Twitter


As resources continue to get tighter for companies, it’s becoming a necessity that they stop wasting time and fully incorporate automation and integrations that can shave hours of effort off of their workload every week. We often find that companies have marketing departments that are siloed by their work channels. A great example is a content team producing fantastic content and an email marketing team working on their weekly newsletter.

If you’ve got a blog, you likely have an RSS feed. And if you have an RSS feed with an email service provider that offers dynamic scripting in an email template, you can typically feed your blog posts directly to an email. Mailchimp’s RSS-to-Email feature does this beautifully…. and even schedules the newsletter for you!

Mailchimp RSS-to-Email

The RSS-to-Email feature is designed to simplify your email marketing efforts. Instead of manually creating email campaigns for each new post, Mailchimp automates the process. This allows you to focus on creating valuable content for your blog while Mailchimp takes care of email distribution.

Mailchimp’s RSS-to-Email feature works through steps that automate converting blog or website content into email newsletters and delivering them to subscribers. Here’s a detailed explanation of how it works:

  1. Integration Setup: To use the RSS-to-Email feature, integrate your blog or website’s RSS feed with Mailchimp. In Mailchimp, you can find an option to set up an RSS campaign.
  2. RSS Feed Fetching: Mailchimp will periodically check your RSS feed for any new updates once you’ve set up the integration. The frequency of this check can be customized based on your preferences. Whenever a new post or update is detected in your RSS feed, Mailchimp will initiate creating and sending your email campaign.
  3. Email Template Customization: Mailchimp offers a variety of customizable email templates. You can design or choose from pre-designed templates that suit your brand and preferences. The email template serves as the layout for your newsletter.
  4. Content Selection: The next step is to select the content included in the email campaign. Mailchimp will pull the latest posts or updates from your RSS feed and display them in the email using content blocks.
  5. Personalization and Design: Mailchimp lets you personalize the email by adding your branding elements, such as your logo, colors, and content formatting. You can also add personalized greetings and messages to engage your subscribers better.
  6. Scheduling: You can choose the specific day and time you want the email campaign sent to your subscribers. This scheduling feature allows you to send emails at optimal times, considering factors like time zones and engagement patterns.
  7. Automation: The entire process is automated with the RSS-to-Email feature set up. Whenever there’s new content on your blog or website, Mailchimp will automatically generate an email newsletter using the latest posts from the RSS feed and send it to your subscriber list based on your chosen schedule.
  8. Reporting and Analytics: Mailchimp provides detailed reports and analytics for each email campaign sent through the RSS-to-Email feature. You can track the performance of your emails, such as open rates, click-through rates, and subscriber engagement. These insights help you refine your marketing strategy and improve future campaigns.

Customizing Your RSS-to-Email Template

There are two elements to customizing your email, your email template and your feed. This section discusses how I’m customizing my email template utilizing merge tags to dynamically create the content utilizing data from the feed.

email editor rss to email mailchimp

Before The Feed

Before my feed, I wanted to display an email heading with the title of my RSS feed and the date that it was requested.

*|RSSFEED:TITLE|*

Date: *|RSSFEED:DATE|*

Feed and Items

Each of your posts within your feed is looped through as items.

*|RSSITEMS:|*

*|RSSITEM:TITLE|*

by *|RSSITEM:AUTHOR|* on *|RSSITEM:DATE|*

*|RSSITEM:IMAGE|*
 
*|RSSITEM:CONTENT|*
*|END:RSSITEMS|*

This sample Mailchimp RSS-to-Email template uses merge tags to insert content from the RSS feed into the email dynamically. Let’s explain each line:

  • *|RSSITEMS:|*: This is the merge tag used to indicate the start of the RSS feed items loop. Each item in the RSS feed will be processed as a separate email campaign with its content.

  • *|RSSITEM:TITLE|*

    : This line generates an HTML

    heading with the title of the RSS feed item. The *|RSSITEM:URL|* merge tag is replaced with the URL of the item, and *|RSSITEM:TITLE|* is replaced with the title of the item.

  • by *|RSSITEM:AUTHOR|* on *|RSSITEM:DATE|*

    : This line creates a paragraph showing the author and date of the RSS feed item. *|RSSITEM:AUTHOR|* is replaced with the author’s name, and *|RSSITEM:DATE|* is replaced with the date of the item.

  • *|RSSITEM:IMAGE|*: This merge tag displays the image of the RSS feed item, typically the featured image. The image URL is inserted here.
  •  

    : This line creates a 9px high empty space between the image and content. It uses a

    element with a height of 9 pixels and a line-height of 9 pixels. The   is used to ensure that the space is visible even in email clients that might collapse empty elements.
  • *|RSSITEM:CONTENT|*: This merge tag displays the content of the RSS feed item. It typically includes a snippet or excerpt from the original post.


  • : This line adds a horizontal line separator after each RSS feed item. The


    element with inline CSS styles creates a 2px tall horizontal line with a solid color of #eaeaea. The width: 100%; ensures that the line spans the full width of the email, and padding-bottom: 20px; adds a 20px space after the line.

  • *|END:RSSITEMS|*: This merge tag signals the end of the RSS feed items loop. Any content after this tag will be outside the loop and will not be repeated for each feed item.

The result is a nice clean email incorporating a week of articles that I’m sending out each Monday morning. You can subscribe here.

Build A Custom WordPress Feed For Email

Some additional customizations needed to be done, though, to make my emails look good:

  • I wanted to incorporate the featured image for each article into the final email.
  • I wanted to modify how long the excerpt of each article was so that there was enough content to engage my readers.
  • Because I’m sending my email newsletter out weekly, I want to ensure that I have an entire week of articles listed in the email rather than the default for my blog’s feed.
  • I didn’t want to modify my current RSS feed in any way because I’m utilizing that for some additional syndication efforts.

Well, with WordPress, you can accomplish this by making an additional feed! Here’s how:

  1. In your child theme directory, add a custom feed for your Mailchimp content in a file called rss-mailchimp.php. This template sets the number of posts in your feed to include all 7 days prior to it being requested. It also properly sets the image in a media:content tag that Mailchimp can consume.
 'post',
        'posts_per_page' => $postCount,
        'date_query'     => array(
            array(
                'after'     => $seven_days_ago,
                'before'    => $current_date,
                'inclusive' => true,
            ),
        ),
    )
);

header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
echo '';
?>

>

    <?php bloginfo_rss('name'); ?> Weekly Articles
    
    
    
    
    
    

    
        
            <?php the_title_rss(); ?>
            
            
            ]]>
            
            

            
            
                
                
                    
                
            

            ]]>
            ]]>
        
    

  1. In your child theme’s functions.php file, add the following code to add a custom feed.Advertisements
add_action('init', 'customRSS');
function customRSS(){
        add_feed('mailchimp', 'mailchimp_rss_callback');
}

function mailchimp_rss_callback(){
	get_template_part('rss', 'mailchimp');
}

Your new feed’s address will be your blog feed, followed by /mailchimp/. So, in my case, the Mailchimp RSS feed that I’m going to use is at:

https://martech.zone/feed/mailchimp/

Some important notes:

  • Be sure to update your permalink settings (you don’t have to change anything) to recognize and cache this new URL correctly.
  • If you’re making modifications to your feed and not seeing them, it’s because WordPress caches your feed. A simple cheat is to just add a querystring when requesting the feed. So in the example above, I just add ?t=1, t=2, t=3, etc., as I’m designating the feed in Mailchimp.
https://martech.zone/feed/mailchimp/?t=1

Martech Zone RSS-to-Email Example

The result is a beautiful, responsive email that nicely displays excerpts of one week of articles:



Source link

Related Posts

How to Turn Customers Into Brand Advocates and Build Loyalty 
Marketing Automation

How to Turn Customers Into Brand Advocates and Build Loyalty 

Prospects are shopping for your products and services, comparing them to those of competitors, and trying to decide which...

by admin
May 24, 2025
The Prestige Formula: Inside Abdulbasyr Makhtibekov’s Method For Engineering Desire In The High-End Auto Market
Marketing Automation

The Prestige Formula: Inside Abdulbasyr Makhtibekov’s Method For Engineering Desire In The High-End Auto Market

A seasoned marketing expert reveals how identity, emotion, and cultural context drive demand in the world of luxury automobiles....

by admin
May 24, 2025
We asked customers how they like to communicate with brands [HubSpot blog survey]
Marketing Automation

We asked customers how they like to communicate with brands [HubSpot blog survey]

Customer communication preferences vary widely in today‘s digital landscape. Some may want to go to a company’s landing page,...

by admin
May 24, 2025
My Top Email Marketing Apps (2025)
Marketing Automation

My Top Email Marketing Apps (2025)

Email Marketing for Shopify (TL;DR) This is a summary of the best email marketing apps for Shopify: 1. Encharge...

by admin
May 24, 2025

POPULAR POSTS

  • Scheduling Instagram Reels: The Complete Guide

    Scheduling Instagram Reels: The Complete Guide

    0 shares
    Share 0 Tweet 0
  • How to set up Discord Server Subscriptions + Shops

    0 shares
    Share 0 Tweet 0
  • How to Use Instagram Collab Posts (+ Ideas to Boost Engagement and Reach)

    0 shares
    Share 0 Tweet 0
  • The Best Time to Post on LinkedIn in 2024 (+Heatmap Graph)

    0 shares
    Share 0 Tweet 0
  • How to Add a Link to an Instagram Story (3 Steps + Examples)

    0 shares
    Share 0 Tweet 0

© MarTechs All rights reserved.

Use of these names, logos, and brands does not imply endorsement unless specified. By using this site, you agree to the Privacy Policy

Navigate Site

  • Home
  • About
  • Services
  • Contact

Newsletter Sign Up.

Loading
No Result
View All Result
  • Home
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.