Tiny Mailchimp Subscribe
A compact, responsive, multilingual, and Divi-friendly Mailchimp subscription form for WordPress.
by Giannis Sifakis · github.com/giansifakis/tiny-mailchimp-subscribe
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/giansifakis/tiny-mailchimp-subscribe/archive/refs/heads/main.zipReadme
Tiny Mailchimp Subscribe
A compact, responsive, multilingual, and Divi-friendly Mailchimp subscription form for WordPress.
Tiny Mailchimp Subscribe provides a small email signup box that can be placed anywhere on a WordPress website using a shortcode. Subscribers are sent directly to a Mailchimp audience through the Mailchimp Marketing API, without storing their email addresses as WordPress records.
Features
- Compact and responsive subscription form
- Mailchimp audience integration
- Divi Text Module and Code Module compatibility
- AJAX submission without page reload
- Optional Mailchimp double opt-in
- Optional Mailchimp tags
- Optional consent checkbox
- Per-page multilingual text through shortcode attributes
- Left, center, or right alignment
- Configurable top and bottom padding
- Configurable form width
- Configurable title, field, message, and button typography
- Configurable title and button colors
- Optional Manrope font loading through Google Fonts
- Honeypot spam protection
- Basic rate limiting
- WordPress nonce validation
- No subscriber email addresses stored in WordPress
- Automatic settings cleanup when the plugin is deleted
Requirements
- WordPress 5.8 or later
- PHP 7.4 or later
- A Mailchimp account
- A Mailchimp API key
- A Mailchimp Audience ID
Installation
-
Download or clone this repository.
-
Make sure the plugin files are inside a folder named
tiny-mailchimp-subscribe. -
Upload the folder to:
/wp-content/plugins/tiny-mailchimp-subscribe/ -
Alternatively, compress the folder as a ZIP file and upload it from WordPress Dashboard → Plugins → Add New → Upload Plugin.
-
Activate Tiny Mailchimp Subscribe.
-
Open Settings → Tiny Mailchimp.
-
Enter your Mailchimp API key and Audience ID.
-
Configure the text, subscription behavior, and design settings.
-
Add the shortcode to a WordPress page, post, widget, or Divi module.
Mailchimp Configuration
API key
Create or copy an API key from your Mailchimp account and paste it into the plugin settings.
A Mailchimp API key normally ends with the account data-center identifier, for example:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-us21
The plugin automatically detects the data center from this suffix.
Audience ID
Enter the ID of the Mailchimp audience to which subscribers should be added.
The Audience ID is not the audience name. It is the unique identifier shown in the audience settings in Mailchimp.
Double opt-in
When double opt-in is enabled, new subscribers are added with a pending status. Mailchimp sends them a confirmation email, and they become subscribed only after confirming their address.
When double opt-in is disabled, new addresses are added directly with a subscribed status.
Tags
Optional Mailchimp tags can be added to every subscriber created through the form. Enter multiple tags as a comma-separated list:
Website, Newsletter, Divi Form
Basic Usage
Add the following shortcode to any shortcode-compatible area:
[tiny_mailchimp_subscribe]
The shortcode uses the default text and design configured under Settings → Tiny Mailchimp.
Using the Plugin with Divi
In the Divi Builder:
-
Add a Text Module or Code Module.
-
Paste the shortcode into the module:
[tiny_mailchimp_subscribe] -
Save the module and page.
The form includes its own responsive styling and is designed to work without requiring a separate Divi Email Optin module.
Shortcode Attributes
Every shortcode attribute is optional. When an attribute is omitted, the corresponding value from the plugin settings is used.
| Attribute | Description | Example |
|---|---|---|
title |
Heading displayed above the form | title="Subscribe" |
button |
Submit button text | button="Join" |
placeholder |
Email field placeholder | placeholder="Your email address" |
email_label |
Accessible email field label | email_label="Email address" |
consent |
Consent checkbox text | consent="I agree to receive updates." |
pending_message |
Message shown when double opt-in is enabled | pending_message="Check your inbox to confirm." |
success_message |
Message shown after direct subscription | success_message="You have been subscribed." |
existing_message |
Message shown for an existing member | existing_message="This email is already subscribed." |
invalid_email |
Invalid email validation message | invalid_email="Enter a valid email address." |
working_text |
Button text shown during submission | working_text="Please wait…" |
generic_error |
General connection or API error message | generic_error="Please try again." |
consent_error |
Message shown when consent is required | consent_error="Please confirm your consent." |
align |
Form alignment: left, center, or right |
align="center" |
padding_top |
Top padding in pixels | padding_top="30" |
padding_bottom |
Bottom padding in pixels | padding_bottom="30" |
max_width |
Maximum form width in pixels | max_width="520" |
title_size |
Title font size in pixels | title_size="28" |
title_color |
Title color as a hexadecimal value | title_color="#111111" |
font_size |
Email field and base text size in pixels | font_size="17" |
font_color |
Email field, consent, and message color | font_color="#333333" |
button_font_size |
Button font size in pixels | button_font_size="16" |
button_color |
Button background color | button_color="#0066cc" |
button_text_color |
Button text color | button_text_color="#ffffff" |
button_padding_y |
Button vertical padding in pixels | button_padding_y="12" |
button_padding_x |
Button horizontal padding in pixels | button_padding_x="24" |
class |
One or more additional CSS classes | class="footer-newsletter" |
Styling Example
[tiny_mailchimp_subscribe
align="center"
padding_top="30"
padding_bottom="30"
max_width="520"
title_size="28"
title_color="#111111"
font_size="17"
font_color="#333333"
button_font_size="16"
button_color="#0066cc"
button_text_color="#ffffff"
button_padding_y="12"
button_padding_x="24"
]
Shortcodes can also be written on a single line, which is often easier when using a WordPress or Divi module.
Multilingual Usage
The plugin does not require a specific multilingual plugin. Add the appropriate translated shortcode to each language version of the page.
It can be used alongside multilingual solutions such as WPML, Polylang, TranslatePress, or manually created language pages.
English
[tiny_mailchimp_subscribe
title="Subscribe"
email_label="Email address"
placeholder="Your email address"
button="Subscribe"
pending_message="Thank you! Please check your inbox to confirm your subscription."
success_message="Thank you! You have been subscribed."
existing_message="This email address is already on the list."
invalid_email="Please enter a valid email address."
working_text="Please wait…"
generic_error="Something went wrong. Please try again."
consent="I agree to receive email updates."
consent_error="Please confirm your consent before subscribing."
]
German
[tiny_mailchimp_subscribe
title="Abonnieren"
email_label="E-Mail-Adresse"
placeholder="Ihre E-Mail-Adresse"
button="Abonnieren"
pending_message="Bitte überprüfen Sie Ihre E-Mails und bestätigen Sie Ihre Anmeldung."
success_message="Ihre Anmeldung war erfolgreich."
existing_message="Diese E-Mail-Adresse ist bereits angemeldet."
invalid_email="Bitte geben Sie eine gültige E-Mail-Adresse ein."
working_text="Bitte warten…"
generic_error="Es ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut."
consent="Ich stimme zu, E-Mail-Updates zu erhalten."
consent_error="Bitte bestätigen Sie Ihre Einwilligung."
]
Spanish
[tiny_mailchimp_subscribe
title="Suscríbete"
email_label="Dirección de correo electrónico"
placeholder="Tu correo electrónico"
button="Suscribirme"
pending_message="Revisa tu correo electrónico y confirma tu suscripción."
success_message="Tu suscripción se ha completado correctamente."
existing_message="Esta dirección de correo electrónico ya está suscrita."
invalid_email="Introduce una dirección de correo electrónico válida."
working_text="Por favor, espera…"
generic_error="Se ha producido un error. Inténtalo de nuevo."
consent="Acepto recibir novedades por correo electrónico."
consent_error="Confirma tu consentimiento."
]
Catalan
[tiny_mailchimp_subscribe
title="Subscriu-t’hi"
email_label="Adreça de correu electrònic"
placeholder="El teu correu electrònic"
button="Subscriu-m’hi"
pending_message="Revisa el teu correu electrònic i confirma la subscripció."
success_message="La teva subscripció s’ha completat correctament."
existing_message="Aquesta adreça de correu electrònic ja està subscrita."
invalid_email="Introdueix una adreça de correu electrònic vàlida."
working_text="Espera, si us plau…"
generic_error="S’ha produït un error. Torna-ho a provar."
consent="Accepto rebre novetats per correu electrònic."
consent_error="Confirma el teu consentiment."
]
Greek
[tiny_mailchimp_subscribe
title="Εγγραφή"
email_label="Διεύθυνση email"
placeholder="Το email σας"
button="Εγγραφή"
pending_message="Ελέγξτε το email σας για να επιβεβαιώσετε την εγγραφή."
success_message="Η εγγραφή ολοκληρώθηκε."
existing_message="Αυτό το email είναι ήδη εγγεγραμμένο."
invalid_email="Εισαγάγετε μια έγκυρη διεύθυνση email."
working_text="Παρακαλώ περιμένετε…"
generic_error="Παρουσιάστηκε κάποιο πρόβλημα. Δοκιμάστε ξανά."
consent="Συμφωνώ να λαμβάνω ενημερώσεις μέσω email."
consent_error="Παρακαλώ επιβεβαιώστε τη συγκατάθεσή σας."
]
Consent Checkbox
The consent checkbox can be enabled globally from Settings → Tiny Mailchimp.
When enabled:
- The visitor must select the checkbox before submitting the form.
- The consent text can be configured globally.
- The
consentshortcode attribute can provide a translated version for each page. - Basic HTML supported by WordPress sanitization can be used in the consent text, including links to a privacy policy.
Example:
[tiny_mailchimp_subscribe consent="I have read and accept the <a href='/privacy-policy/'>Privacy Policy</a>."]
Enabling a consent checkbox does not by itself guarantee compliance with privacy or marketing laws. The website owner remains responsible for using appropriate consent wording, privacy information, retention practices, and Mailchimp account settings.
Manrope Font
The plugin applies Manrope to the subscription form.
When Load Manrope from Google Fonts is enabled, the plugin loads the font from Google Fonts on pages containing the shortcode. Disable this option when Manrope is already loaded by the WordPress theme, Divi, or another performance/privacy solution.
AJAX and Validation
The form submits through WordPress AJAX without refreshing the page.
Before a request is sent, the front-end script checks:
- Whether the email field contains a valid email address
- Whether the consent checkbox has been selected when enabled
The server then performs its own validation and sends the request to Mailchimp.
Spam and Security Measures
The plugin includes:
- WordPress nonce verification
- Email sanitization and validation
- A hidden honeypot field
- Basic transient-based rate limiting
- Sanitized settings and shortcode values
- Restricted settings access through the
manage_optionscapability
The Mailchimp API key is saved in the WordPress options table. Access to the WordPress database and administration area should therefore be properly secured.
Data Handling
The plugin does not create a local subscriber list and does not store submitted email addresses as WordPress posts or plugin records.
Submitted information is sent directly from WordPress to the configured Mailchimp account. Mailchimp’s own data processing and privacy terms apply to information stored in the Mailchimp audience.
The plugin temporarily creates a hashed rate-limit key based on the visitor IP address and email address. This transient expires after a short period and is used only to reduce repeated submissions.
Custom CSS
Use the class shortcode attribute to add a custom class to a specific instance:
[tiny_mailchimp_subscribe class="footer-newsletter"]
You can then add custom CSS through your child theme or Divi → Theme Options → Custom CSS:
.footer-newsletter .tms-title {
font-weight: 800 !important;
}
.footer-newsletter .tms-row {
border-width: 2px;
}
Main front-end classes include:
.tms-section
.tms-wrap
.tms-title
.tms-form
.tms-row
.tms-email
.tms-submit
.tms-consent
.tms-message
Troubleshooting
The form always displays a general error
Check that:
- The API key is valid and contains the data-center suffix.
- The Audience ID is correct.
- The Mailchimp account and audience are active.
- The server can make outbound HTTPS requests.
- A security plugin or firewall is not blocking WordPress AJAX or Mailchimp requests.
The confirmation email is not received
Check that:
- Double opt-in is enabled in the plugin settings.
- The subscriber is added to Mailchimp with a pending status.
- The message is not in the spam or promotions folder.
- Mailchimp’s audience signup email is configured correctly.
The shortcode is visible as plain text
Make sure the shortcode is placed in a shortcode-compatible WordPress area. In Divi, use a Text Module or Code Module and confirm that the plugin is active.