MailChimp Forms by MailMunch Shortcode

Below, you’ll find a detailed guide on how to add the MailChimp Forms by MailMunch Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the MailChimp Forms by MailMunch Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the MailChimp Forms by MailMunch Plugin and the shortcodes it provides:

Plugin Icon
MailChimp Forms by MailMunch

"MailChimp Forms by MailMunch is a dynamic WordPress plugin that allows seamless integration of MailChimp forms into your site. It helps boost user engagement and grow your mailing list efficiently."

★★★★☆ (368) Active Installs: 30000+ Tested with: 6.2.3 PHP Version: false
Included Shortcodes:
  • [mailmunch-form]

MailChimp Forms by MailMunch [mailmunch-form] Shortcode

The Mailchimp-Forms-by-Mailmunch shortcode is a tool that enables you to embed a Mailchimp form into your WordPress site. This shortcode retrieves a specific Mailchimp form using its unique ID, which must be provided in the ‘id’ attribute. The form is then displayed within a div element, with its visibility set to ‘none’ to ensure it’s hidden until called upon. This allows for a seamless integration of your Mailchimp forms into your WordPress site.

Shortcode: [mailmunch-form]

Parameters

Here is a list of all possible mailmunch-form shortcode parameters and attributes:

  • id – It’s the unique identifier for each individual form.

Examples and Usage

Basic example – Displays a MailMunch form using the form’s unique ID.

[mailmunch-form id=1 /]

PHP Function Code

In case you have difficulties debugging what causing issues with [mailmunch-form] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('mailmunch-form', array($this, 'shortcode_form'));

Shortcode PHP function:

function shortcode_form($atts) {
		return "<div class='mailmunch-forms-short-code mailmunch-forms-widget-".$atts['id']."' style='display: none !important;'></div>";
	}

Code file location:

mailchimp-forms-by-mailmunch/mailchimp-forms-by-mailmunch/public/class-mailchimp-mailmunch-public.php

Conclusion

Now that you’ve learned how to embed the MailChimp Forms by MailMunch Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *