All categories

Updates

Adding a MailerPress Form with Your Page Builder to Collect Emails

MailerPress offers a flexible shortcode system that allows you to easily embed forms anywhere on your WordPress site. Whether you’re using a page builder like Elementor or Bricks Builder, inserting a form is as simple as adding the shortcode to your preferred module or widget.

For developers, the shortcode can also be used directly within PHP templates, giving you full control over form placement and customization.

This versatility ensures that you can capture emails and grow your audience seamlessly, no matter your workflow or technical setup.

Elementor user? Since version 1.2 of MailerPress Pro, you can directly use our integration with our MailerPress Form block for more convenience and flexibility.

Quick setup

We strongly recommend to enable the double opt-in feature before embedding a form into your site to capture emails.

Insert this shortcode to show the form:

[mailerpress_optin list="1"]

Required settings

SettingsDescriptionExample
listRequired – List IDs, separated by commaslist="1" or list="1,2,3"
tagsTag IDs, separated by commastags="5,10"
button_textText buttonbutton_text="Subscribe"
button_colorButton color (hex)button_color="#0073aa"
redirectURL or post/page/post type ID for redirect after successful form submissionredirect="123" or redirect="https://..."

Common examples

Simple form

[mailerpress_optin list="1" button_text="S'inscrire"]

Simple forms with tags

[mailerpress_optin list="1" tags="5,10" button_text="Join us"]

Stylized form

[mailerpress_optin list="1" button_color="#e74c3c" text_color="#fff" border_radius="8px"]

Form with redirect

[mailerpress_optin list="1" redirect="123"]

Complete MailerPress form

[mailerpress_optin list="1" tags="5" success_message="Thank you for subscribing!" show_first_name="true" show_last_name="true" first_name_label="Prénom" last_name_label="Nom" email_label="Email" button_text="S'abonner" button_color="#2c3e50"]

Embedding in PHP

Copy and paste this code into your theme or child theme PHP files to display the MailerPress form anywhere on your site.

echo do_shortcode('[mailerpress_optin list="1"]');

Important

  • The list parameter is required.
  • Colors must be in hexadecimal format (e.g., #000, #fff, #0073aa).
  • Boolean values should be provided as strings: "true" or "false".
  • The redirect parameter accepts either a WordPress post, page or post type ID or a full URL.

If you’re using the WordPress Block Editor, try our dedicated MailerPress block for easier integration.