Hot answers tagged

4

Since you are already getting the ID of the newly created post ($post_id), you just need to get the URL and redirect after the submission. Using get_permalink( $post_id ) you can get post's URL. Also, you can get rid of the header() function to send a new HTTP header, and use WordPress' own function for redirect - wp_redirect(). wp_redirect( ...


1

You could make the form action be the current page's URL. When the user submits the form the page gets reloaded with the POST parameters. Then in your widget's code you check if those parameters exist. If so, you check them and then process them with your wp_remote_post. Personally I use Gravity Forms for stuff like this. I create the form in Gravity and ...



Only top voted, non community-wiki answers of a minimum length are eligible