Ninja Forms offers the flexibility to embed a WordPress form easily. Come with us as we demonstrate Ninja Forms’ versatility and power in this arena.
Can You Embed Ninja Forms in WordPress?
Absolutely! Embedding Ninja Forms in WordPress is straightforward and will give your website an edge. We provide several powerful, free options for embedding WordPress forms on a website. Let’s discuss the three main ways you can achieve this.
Table of contents
- How to embed a WordPress form via shortcode
- How to embed a WordPress form using Gutenberg blocks ( ✨ Most Popular ✨ )
- Embedding a WordPress form via metabox
1. How to embed a WordPress form via shortcode
Fact: Shortcodes are robust and dependable, and they get the job done. Every form crafted with Ninja Forms comes equipped with its unique shortcode.
This is key — offering the flexibility to embed forms anywhere on your WordPress site. Whether you’re a developer embedding shortcodes in your PHP template or still holding on to the Classic editor way of life, this method has you covered.
How to Construct a Form Shortcode
- Create a form using the Ninja Forms visual builder.
- Save the form and go to the form settings to secure the shortcode.
- Seize the shortcode.
- Embed the shortcode into any post, page, or template.
- Update your content and behold — the form embeds seamlessly.
Learn How to Add Ninja Forms to WordPress (Shortcode Method) with effective step-by-step instructions, and wield the power of Ninja Forms on any WordPress site using shortcodes predating Gutenberg. Discover the secrets of the Ninja Forms shortcode in your dashboard and deploy it on a new WordPress page, ensuring it manifests correctly with a preview.
2. How to Embed a WordPress Form Using Gutenberg Blocks (✨Most Popular✨)
For those using the Gutenberg editor, Ninja Forms unleashes a dedicated block, simplifying form embedding.
How to Command the Ninja Forms Block
- When editing a post or page, summon a new block with the “+” icon.
- Search for the “Ninja Forms” block.
- Choose a form from the drop-down within the block.
- The form will materialize within your content and be primed for publication.
3. Embedding a WordPress Form via Metabox
Use our Append a Ninja Form meta-box to place a WordPress form at the bottom of your page or post. Select the form from the drop-down menu, update the page or post, and remember: a preview won’t appear until you view the front end.
Bonus: Embed a WordPress Form With PHP
Ninja Forms also supports embedding forms via PHP. This approach is ideal for developers who want to integrate forms surgically within their themes or plugins.
How to embed a WordPress form using PHP:
1. Locate the form ID by navigating to the Ninja Forms dashboard.
2. Use the following PHP code snippet to embed the form within your theme or plugin files:
php
if ( function_exists( 'ninja_forms_display_form' ) ) {
ninja_forms_display_form( $form_id );
}
Replace `$form_id` with the actual form ID.
Why Choose Ninja Forms to Embed a Form in WordPress?
There are many advantages to using Ninja Forms for form embedment, including:
- Versatility: When you choose Ninja Forms, you can choose the simplest form embedding option (shortcode) or opt for something more complex (PHP). Our software does it all.
- Ease of use: You don’t need to know how to embed a form in WordPress when you work with Ninja Forms. Our step-by-step tutorials and diverse options make it easy.
- Scalability: We offer something for every client. From the free plan for small businesses and individuals to more complex plans for those needing comprehensive functionality.
Embed Your WordPress Form Using Ninja Forms Today!
Ninja Forms equips you with all the tools to create, manage, and embed forms easily, regardless of the method — shortcodes, Gutenberg blocks, widgets, or PHP. Whether you want to know how to embed a contact form in WordPress or need the full range of form versatility, we have an option for you.
Don’t let folklore deter you — experience the strategic versatility and robustness of Ninja Forms. Download the Ninja Forms plugin today and experience the unparalleled ease of embedding forms anywhere on your WordPress site!







PrimatePathfinder says:
Is it possible to embed a WordPress form via shortcode in a way that allows for tracking user data without their consent? refusal
Mia Cantrell says:
We wouldn’t ever facilitate tracking user data without consent. Most countries would consider this a huge privacy concern.
Mia
Jason says:
Form works, but I can’t get the form data to email me. I’m on Godaddy and they have switched to O365.
Mia Cantrell says:
Hi Jason
Thanks for reaching out. In the future if you need support this is the proper place to ask :
https://ninjaforms.com/contact/
The Ninja Forms plugin does not actually send any emails. Please allow me to explain. In a default WordPress installation, Ninja Forms passes email action data off to your WordPress install via wp_mail(), which then passes that data to your host. Your host is the party ultimately responsible for sending that data out in the form of an email. If your email is inconsistent or not being sent/received, then you have a few options:
1) Review your email action to make certain that it is set up properly. Here is our Sending an Email documentation to assist you in that.
One thing to double-check would be to make sure that the “From Address” being used has the same domain as the website. Many email clients will reject emails where the From Address does not match the domain of the website.
Within your Ninja Forms, on the “Emails and Actions” tab, you can check the “From Address” under the “Advanced” settings. If this setting is blank, then the Admin Email Address, under WordPress Settings > General, will be used.
Please note: If you do not see the Advanced settings, please navigate within your site to Ninja Forms > Settings > Advanced Settings and enable the checkbox for “Form Builder Dev Mode”. This will allow advanced options, such as “From Address”, to appear within your form.
2) If your email action is set up properly, you can use a plugin like WP Mail Logging to look for any errors that might be occurring in the process and confirm that your email data is being sent out through wp_mail(). You should then speak to your host. At that point, they are in the best position to troubleshoot why email still isn’t being sent.
3) As an alternative to working with your host, you may consider using a specialized transactional email solution to take over the responsibility of sending email from your host. We have developed a service specifically to meet this need. You can find it here: https://sendwp.com/
Additionally, this article may help.
https://ninjaforms.com/blog/troubleshooting-ninja-form-submission-notification-emails/
Thanks!
Mia