Gravity forms are pretty simple to embed on your website; you can easily add forms to widgets and content. But what happens when you need to add a form to a section outside of the GUI (graphical user interface)?
How to add Gravity Forms outside of WordPress’s GUI
Find where you’d like to add Gravity Forms
You will need to figure out which corresponding file you need to add the script to (e.g., blog posts = single.php)
Open the file using an FTP manager
It’s best to do edits on a staging server in case you break the site. If the site is new and has zero traffic, I wouldn’t worry about a staging server.
Add the Shortcode Script
You have two options for this:
<?php gravity_form( 1, false, false, false, '', false ); ?>
This snippet will display the form with an id of ‘1’; the title and description will not be displayed, the form itself will not display if it is inactive, and it will not use AJAX for form submission.
<?php echo do_shortcode('[gravityf0rm id=1 name=ContactUs title=false description=false]'); ?>
Do_shortcode adds a wrapper around a classic shortcode embed code and allows it to be executed within a PHP environment. You can add any traditional embed code in its place.
* I’ve added a 0 to gravity forms do_shortcode above so it would not render a form in my how-to guide