Below, you’ll find a detailed guide on how to add the Kali 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 Kali Forms Plugin shortcode not to show or not to work correctly.
Before starting, here is an overview of the Kali Forms Plugin and the shortcodes it provides:
"Kali Forms is a user-friendly contact form builder for WordPress. It features a simple drag & drop interface, making form creation easy and convenient. Perfect for all your site's contact needs."
- [kaliform]
Kali Forms [kaliform] Shortcode
The Kali-Forms shortcode, ‘kaliform’, is designed to register a new shortcode with specified arguments. It initiates a new instance of Form_Shortcode class with given arguments. The output is then passed through a filter for possible modifications, before returning the final HTML form.
Shortcode: [kaliform]
Examples and Usage
Basic example – A simple usage of the Kali Forms shortcode to display a form on your page by referencing its ID.
[kaliform id=1 /]
PHP Function Code
In case you have difficulties debugging what causing issues with [kaliform]
shortcode, check below the related PHP functions code.
Shortcode line:
add_shortcode('kaliform', [$this, 'register_shortcode']);
Shortcode PHP function:
function register_shortcode($args)
{
$form = new Form_Shortcode($args);
$form = apply_filters(
$this->slug . '_form_shortcode_finished_rendering',
$form
);
return $form->html;
}
Code file location:
kali-forms/kali-forms/Inc/Backend/Posts/class-forms.php
Conclusion
Now that you’ve learned how to embed the Kali 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.
Leave a Reply