Family Encyclopedia >> Electronics

How to Display MailChimp Subscriber Count in WordPress: 2 Proven Methods

Want to showcase your MailChimp subscriber count on your WordPress site? As experienced WordPress developers, we've seen how displaying this number builds powerful social proof, motivating more visitors to join your newsletter.

MailChimp remains one of the most user-friendly email marketing platforms. If you're new to it, check out our guide on integrating MailChimp with WordPress.

We'll cover two reliable methods we've tested on live sites. Method 1 uses a simple plugin for quick setup. Method 2 involves custom code for a branded display without logos. Beginners should start with Method 1.

Method 1: Using the MailChimp Subscriber Chiclet Plugin

Install and activate the MailChimp Subscriber Chiclet plugin. Then, go to Settings » MailChimp Subscriber Chiclet to set it up.

How to Display MailChimp Subscriber Count in WordPress: 2 Proven Methods

First, enter your MailChimp API key. Log in to your MailChimp dashboard to generate one if needed.

How to Display MailChimp Subscriber Count in WordPress: 2 Proven Methods

Save changes. The plugin will fetch your lists. Select your list, tweak settings, then copy the shortcode at the bottom.

Paste the shortcode into any post, page, or text widget to display the count.

How to Display MailChimp Subscriber Count in WordPress: 2 Proven Methods

Method 2: Fetch Subscriber Count via MailChimp API (Custom Plugin)

The plugin method includes the MailChimp logo, but you might prefer plain text to match your signup forms. This approach creates a lightweight plugin using the official MailChimp API for flexible display.

Step 1: Create a folder named mc-subscriber-count on your desktop.

Step 2: Inside it, create mc-subscriber-count.php and add this code. Replace Your_MailChimp_API_Key with your actual key. This caches the count daily for performance.

<?php
/**
 * Plugin Name: MailChimp Subscriber Count
 */

function wpb_mc_sub_count() {
    $logs_dir = plugin_dir_path(__FILE__) . 'logs/';
    $lastRunLog = $logs_dir . 'lastrun.log';
    $subfile = $logs_dir . 'subcount.log';

    if (time() - (int)file_get_contents($lastRunLog) > 86400) {
        require_once plugin_dir_path(__FILE__) . 'src/Mailchimp.php';
        $MailChimp = new Mailchimp('Your_MailChimp_API_Key');
        $mc = $MailChimp->get('lists/list');
        $subscriber_count = $mc['data'][0]['stats']['member_count'];
        file_put_contents($lastRunLog, time());
        file_put_contents($subfile, $subscriber_count);
    } else {
        $subscriber_count = file_get_contents($subfile);
    }
    return number_format($subscriber_count);
}
add_shortcode('mc-subscribers', 'wpb_mc_sub_count');
add_filter('widget_text', 'do_shortcode');
?>

Step 3: In the mc-subscriber-count folder, create a logs subfolder. Add two empty files: lastrun.log and subcount.log (use Notepad or similar).

How to Display MailChimp Subscriber Count in WordPress: 2 Proven Methods

Step 4: Download the MailChimp PHP Wrapper from the MailChimp GitHub repository (link at bottom right).

Extract the ZIP. Copy src/Mailchimp.php and the src/Mailchimp folder into your plugin folder.

How to Display MailChimp Subscriber Count in WordPress: 2 Proven Methods

How to Display MailChimp Subscriber Count in WordPress: 2 Proven Methods

Step 5: Upload the mc-subscriber-count folder to /wp-content/plugins/ via FTP.

Step 6: In WordPress admin, go to Plugins and activate MailChimp Subscriber Count.

Step 7: Add [mc-subscribers] to any post, page, or widget.

This setup delivers accurate, fast-loading counts we've relied on for client sites. If you have questions, drop a comment below.