• I have an existing website which has wordpress installed as a means to gather customer feedback. To allow guest posting I use a plugin called TT Guest Post Submit. My directory structure is:

    http://www.mydomain.com
    http://www.mydomain.com/wordpress

    I have a custom page at the root of my website which uses shortcode to display the guest post form. The problem I’m having is that submitting the form does nothing. It basically reloads the page. Can someone tell me if it’s even possible to call a plugin function from outside of wordpress?

    The following code works to either display a test form or do_action when the form is submitted; however the WP plugin function never gets fired on the do_action call:

    <?php
    
    	if ( isset( $_POST['email-submission'] )) {
    		echo "Form was submitted, call the plugin function...";
    		do_action( "submit_post_function");
    	} else {
    		echo "Display the form...";
    ?>
    
    	<div id="content">
    	    <form method="post" action="">
    	      <!-- TODO -->
    	      <input type="submit" name="submit" value="Send Email" />
    	      <input type="hidden" name="email-submission" value="1" />
    	    </form>
    	</div><!-- /#content -->
    
    <?php
    
    	} // endif
    
    ?>

    I’m just wondering if I don’t have the right hooks in place for calling anything on a plugin, or if it’s even possible. I’ve got decent coding skills, though not with WP or php, and I’m sure with a little bit of direction I could get this to work. One more thing worth mentioning, I use godaddy hosting w/Windows platform.

    Any help would be awesome!

    Thanks

    Val

  • The topic ‘Form submit from outside WP’ is closed to new replies.