-
-
Save stevehenty/79364b0e2e029b995ef6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_dashboard_setup', 'sh_dashboard_setup' ); | |
function sh_dashboard_setup() { | |
wp_add_dashboard_widget( 'sh_gf_dashboard', 'My Gravity Form', 'sh_gf_dashboard' ); | |
} | |
function sh_gf_dashboard() { | |
// Make sure the scripts are loaded | |
// http://www.gravityhelp.com/documentation/gravity-forms/extending-gravity-forms/functions/gravity_form_enqueue_scripts/ | |
gravity_form_enqueue_scripts( 2, true ); | |
// Render the form | |
//http://www.gravityhelp.com/documentation/gravity-forms/user-guides/getting-started/embedding-a-form/ | |
gravity_form( 2, false, true, false, null, false ); | |
// Or use the shortcode if you prefer | |
//echo do_shortcode( '[gravityform id=2]' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.gravityforms.com/embedding-a-form/
https://docs.gravityforms.com/gravity_form_enqueue_scripts/
The previous links are not found.