Constant Contact Forms by MailMunch Shortcode

Below, you’ll find a detailed guide on how to add the Constant Contact 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 Constant Contact Forms by MailMunch Plugin shortcode not to show or not to work correctly.

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

Plugin Icon
Constant Contact Forms by MailMunch

"Constant Contact Forms by MailMunch is a dynamic plugin designed to integrate seamlessly into your WordPress site. It simplifies email marketing by automating form creation and contact management."

★★★★✩ (48) Active Installs: 5000+ Tested with: 6.2.3 PHP Version: false
Included Shortcodes:
  • [mailmunch-form]

[mailmunch-form] Shortcode

The ‘mailmunch-form’ shortcode is part of the constant-contact-forms-by-mailmunch plugin. It’s used to embed a MailMunch form into your WordPress site. This shortcode generates a div element with a unique class name. The class name is determined by the ‘id’ attribute passed into the shortcode. The resulting form will be hidden by default.

Shortcode: [mailmunch-form]

Parameters

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

  • id – The unique identifier of the contact form.

Examples and Usage

Basic example – The following shortcode is used to display a mailmunch form by referencing its ID. Replace ‘your-id’ with the actual ID of your form.

[mailmunch-form id='your-id' /]

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:

constant-contact-forms-by-mailmunch/constant-contact-forms-by-mailmunch/public/class-constantcontact-mailmunch-public.php

Conclusion

Now that you’ve learned how to embed the Constant Contact 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 *