I had a WordPress installation in
/blog/, but I needed a WordPress’s GravityForm to render
/contact.php an external non-Wordpress php page. I could of coded a form myself, but there are so many advantages to using GravityForms.
contact.php in a perfect world, the following would work:
but it doesn’t — upon submission the page reloads with entered values in-tacked but no sucessful submission message or errors.
Looking in the first file in GravityForm plugin
gravityforms.php, there’s a ton of actions hooked into the
wp action. So by simply firing
wp, the GravityForm now works, outside of a WordPress installation.
wp_footer() which means style sheets, ajax submission and conditional logic won’t work. I also think loading wordpress this way neglects to run init, which several functions are hooks into, but I got what I needed out of simply: