• Add CSS class to form element

    You can add or remove CSS classes to the HTML element containing the sign-up form using the mc4wp_form_css_classes filter hook. If we wanted to add a form-inline class to the form, we can use the following code: The above example adds the form-inline class which is used by Bootstrap. Please note that this filter adds […]

  • Show sign-up form from theme files

    To show a sign-up form from the PHP files in your WordPress theme, you can use the mc4wp_show_form() function. It takes an optional parameter which defines the ID of the form you would like to show. If you omit this parameter, your default form will be shown. Example: Showing default form Example: Showing form with […]

  • Add custom form validation

    It is possible to add custom form validation logic to any form created by the Mailchimp for WordPress plugin using a filter hook. The following snippet will throw an error if a field named some-field does not have the value expected-value. To show a custom message for the incorrect_value error code returned above, you will […]

  • Show sign-up form in sidebar or footer

    In most WordPress themes, the sidebar and footer are so called widget areas. This means that you can use the dedicated “Mailchimp for WP Form” widget to show a sign-up form in these areas. To add this widget to your sidebar, go to Appearance > Widgets and select the Mailchimp for WP Form widget. Then, […]

  • Add Mailchimp subscribe form to all posts automatically

    To automatically add a sign-up form to all your posts, go and edit the form you would like to show and open up the Settings tab. From there, locate the Automatically add this form to posts in the following category setting and pick a category. Then save the form to update your settings. That will […]

  • Add variables to redirect URL

    You can pass variables from your form to the page your form redirects to. This way you can, for example, thank subscribers by name after they’ve succesfully filled in your form. To do this, use one of the available form variables we’ve listed for you on the Edit form page and add it to the […]

  • Adding tags to Mailchimp subscribers

    Subscriber tags are a relatively new Mailchimp feature to help organize your contacts. Our Mailchimp for WordPress plugin allows you to easily add tags to all new subscribers that subscribe through our sign-up forms. To use this feature, go to the page where you edit your form(s), open the Settings and locate the setting from […]

  • Accepted form shortcode arguments

    The Mailchimp for WordPress plugin comes with a shortcode that allows you to place a sign-up form just about anywhere. You can put a shortcode in a Post, Page or Widget to display the form to website visitors in that position. While this shortcode works without any arguments, you can specify a few arguments to […]