Pirate Forms Shortcode

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

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

Plugin Icon
Contact Form & SMTP Plugin for WordPress by PirateForms

"PirateForms is a Contact Form & SMTP Plugin for WordPress. It simplifies the process of creating and managing contact forms and seamlessly integrates with your email SMTP for efficient communication."

★★★★☆ (223) Active Installs: 60000+ Tested with: 4.9.24 PHP Version: 5.2.4
Included Shortcodes:
  • [pirate_forms]

Pirate Forms [pirate_forms] Shortcode

The Pirate Forms shortcode is used to display a form in your WordPress site. It allows customization of form elements like name, email, subject, message, and more.

Shortcode: [pirate_forms]

Parameters

Here is a list of all possible pirate_forms shortcode parameters and attributes:

  • id – Unique identifier for the contact form.
  • from – Indicates if the form is from a widget.
  • ajax – Enables or disables ajax form submission.

Examples and Usage

Basic example – Displaying a simple contact form using the Pirate Forms plugin

[pirate_forms]

Advanced examples

Displaying a specific form by referencing its ID. This will load the form with the specified ID.

[pirate_forms id="2"]

Enabling AJAX for the form. This will allow the form to submit without requiring a page reload.

[pirate_forms ajax="yes"]

Displaying a form from a widget. This allows you to display a form that was created in a widget.

[pirate_forms from="widget"]

Combining multiple parameters. This example shows a form with a specific ID, enabled AJAX, and is displayed from a widget.

[pirate_forms id="3" ajax="yes" from="widget"]

PHP Function Code

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

Shortcode line:

add_shortcode( 'pirate_forms', array( $plugin_public, 'display_form' ) );

Shortcode PHP function:

Code file location:

pirate-forms/pirate-forms/includes/class-pirateforms.php

Conclusion

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