This method, using the Genesis eNews Extended plugin, is preferable to pasting opt-in code from your email provider, as it will be styled to match your Genesis theme.
- Create both the list and the form in your email provider.
- If you are working on a draft site:
- When creating the form, and adding a custom “success” / “thank you” URL or “error” URL, you need to make sure the URL is the final correct, mapped domain.
- Note which fields are required. You will need to make sure each of these fields is displayed in the opt-in widget.
- If you are putting the opt-in box in one of your pages/posts:
- Activate the Widgets on Pages plugin, if it is not already activated.
- Go to Settings > Widgets on Pages.
- Add as many new widget areas as necessary in the first panel (they are referred to as sidebars in this menu). Click Save Changes.
- In the Optional Sidebar Names section, give each widget area an appropriate, descriptive name. Click Save Changes.
- Activate the Genesis eNews Extended plugin, if it is not already activated.
- Go to the Appearance > Widgets menu.
- Drag a new Genesis eNews Extended widget to the appropriate sidebar / widget area.
- Go to your email provider and get the raw or manual HTML code for your form. There will often be an automatic or easy HTML option, which you do not want. You may need to scroll down or look a little harder to find the raw or manual HTML code.
- Find the form action URL and copy it. The URL is inside the form tag and comes right after the code that looks like:
<form method="post" action="
- For iContact, it is usually the following URL, but you should double check to make sure: https://app.icontact.com/icp/signup.php
- For MailChimp, you will have a unique URL for each form.
- Find the IDs for each of the required fields and copy them.
- For iContact, the email field is usually fields_email. For MailChimp, it is usually EMAIL.
- For iContact, the first name field is usually fields_fname. For MailChimp, it is usually FNAME.
- For iContact, the last name field is usually fields_lname. For MailChimp, it is usually LNAME.
- Find all of the hidden fields in the HTML and copy them. They may be spread out throughout the HTML, so look carefully. For each hidden field, make sure to include everything from the initial opening
<to the closing
>. The hidden field tags begin with:
<input type="hidden". For iContact, you have to display the HTML form first and extract the hidden fields from there. Because of the way the iContact script works, the hidden fields will only appear in the HTML when you are right clicking on the form and using Inspect Element (if you are using Chrome), and they will not appear in the HTML when using View Source. You will have to copy one line at a time when using Inspect Element. For iContact, there are usually 8 hidden fields in the form HTML.
- Go back to the Genesis eNews Extended widget in your website.
- Copy the appropriate form action URL and paste it in the Form Action: box.
- Copy the appropriate email field and paste it in the E-Mail Field: box.
- If you are requiring first names, copy the appropriate first name field and paste it in the First Name Field: box.
- If you are requiring last names, copy the appropriate last name field and paste it in the Last Name Field: box.
- Copy the hidden fields and paste them in the Hidden Fields: box. Remove any blank line breaks above, below, and in the middle of the code.
- Customize any of the other fields in the widget as necessary.
- Click Save and Close.
- If you are using this with Widgets On Pages, copy the shortcode from the top of the widget area for use in your pages/posts.