Skip to content

Adding email forms to key locations around your website

Optins can put a signup form in four main areas of your website: a post or page, sidebars, the page title, or areas between major page elements like the header and footer.

Every form sends subscribers to your Default Email List, unless you choose otherwise, so set the main email list for your site from the global settings to save time when adding forms elsewhere later.

Before you start

  • You need an Administrator account on a site running Marketers Delight 6.0.4 or later.
  • Optins also requires WordPress 6.2 or later and PHP 7.4 or later.
  • Install and activate the Optins Drop-in, then connect your email service. Your lists appear in the menus below only after a service is connected.

Set a default email list

  1. In the WordPress admin menu, select Optins, then open the Email Form tab.
  2. Choose a list from Default Email List. Lists are grouped by email service. The first choice, Select an email list…, leaves the default empty.
  3. Select Save.

If your email service is not one Optins connects to, paste its form code into Custom HTML Code on the same tab and save. An HTML Code choice then appears in the list menus, including Default Email List, so your own form can be the default.

A form set to Use default email list always follows this setting. Change the default later and every one of those forms moves to the new list.

Add a form to a post or page

Block editor

Classic editor

  1. Open the post or page and add the MD Email Form block.
  2. In the block settings sidebar, open Email Form. Leave Email List on Use default email list, or choose another list for this form. The default choice shows the name of your default list in parentheses.
  3. Optionally, turn on Ask for name to add a name field, or Attach fields in a single line to put the fields and button side by side.
  4. Change Email Field Label or Submit Button Text if you want your own wording. The button says Join Now! until you change it.
  5. Open Text to add a Lede, Title, Text, and Footer Text around the form.
  6. Save the post or page.
An Email Form block selected in the block editor with the Email Form and Text panels open in the sidebar

Choose the list, fields, and button text in the Email Form panel, then the words around the form in Text.

The remaining panels design the box around the form:

  • Image adds an image beside the form, with Image Position and Image Width.
  • Colors sets Background Color, Title Color, Text Color, Button Color, Button Text Color, and an Overlay Color with Overlay Opacity. Each picker shows only your site’s Color Palette.
  • Design adds a background image with Background Size, and sets Margin Bottom, Padding, Add shadow, and Add border radius. Padding applies once the form has a background color, text color, or background image.
An Email Form block selected in the block editor with the Design panel open

The Design panel sets the background image, spacing, shadow, and border radius.

  1. Open the post or page and place your cursor where the form should go.
  2. Enter the [md_email] shortcode. With no attributes it uses your Default Email List.
  3. Add attributes to change the form, for example: [md_email attached="true" submit_text="Send me the guide"].
  4. Save the post or page.

These attributes change the form itself:

AttributeWhat it sets
listA list other than the default. Use the ID your email service gives the list or form (for example, a Mailchimp audience ID), or custom_html for your Custom HTML Code form.
attachedtrue puts the fields and button on one line.
email_input_name1 adds a name field.
name_labelThe name field’s label. The default is “Enter your name…”.
email_labelThe email field’s label. The default is “Enter your email…”.
submit_textThe button text. The default is “Join Now!”.

These attributes put the form in a box, the same box the MD Email Form block prints:

AttributeWhat it sets
lede, title, descText above the form.
footerText below the form.
bg_color, text_colorBackground and text color, as a hex value such as #1d3557.
bg_imageA background image, as a Media Library image ID or image URL.
classesExtra CSS classes on the box.
[md_email title="Get the worksheet" desc="One page, every Sunday." bg_color="#1d3557" text_color="#ffffff" attached="true"]

If AWeber or MailerLite is connected, the block also shows Thank You Page URL, which sends new subscribers to a page on your site after they sign up.

Add a form to a sidebar

  1. Go to Appearance → Widgets.
  2. Add the MD → Email Form widget to a widget area.
  3. Enter a Title and Description, and leave Email List on Use default email list… or choose another list.
  4. Optionally, check Show fields on single line or Ask for subscribers name, and change the field labels and Submit Button Text.
  5. Optionally, set colors, a Background Image, and Classes under Form Design.
  6. Save the widget.
An email form widget in a post sidebar

The widget shows the title, description, and form in the sidebar.

Add a form to the page title

An email form can sit with the title at the top of a page, post, or archive, in place of call to action links.

For one page or post, open it in the editor and go to Page Settings → Featured → Call to Action. For a post type archive, go to a screen such as Blog → Settings, open Page Title, then select Call to Action. For one category, edit the category and do the same.

  1. Choose Email Form from CTA Type.
  2. Choose a Position: After Title (the default), Before Title, or Title Aside.
  3. Leave Email List on Use default email list, or choose another list.
  4. Optionally, add a Lede and Title above the form, check Attach input fields to each other in a single line or Ask for subscribers name in signup form, and change the labels and Submit Button Text.
  5. Select Publish, Update, or the save button for the settings screen you are on.
The Call to Action tab in Page Settings with Email Form chosen as the CTA Type and the email form fields showing

Choose Email Form as the CTA Type, then its position and list.

To put a form in a box at a set position across many pages, such as after the first paragraph of every post, add a call to action box with an email form instead.

Check the result

Open the page in a new tab. The form should show your list’s fields and the button text you set, or Join Now! if you left it blank. Enter a test address and confirm it reaches the right list in your email service.

If no form appears, the form has no list: it is set to use the default, and no Default Email List is set. Set the default on Optins → Email Form, or choose a list on the form itself. If a page title form is missing, check that CTA Type is set to Email Form. If you use a caching plugin, clear its cache and reload.

Alex Mangini

Hi, I'm Alex! I started writing about web design and blogging at 13 years old, which turned into client work, which led to building my own software. 15 years later I'm still at it, and Marketers Delight is the epitome of my philosophy for building on the web.