WPUF Tip – Redirect after submission

I’ve been using WordPress User Frontend for a few days now to manage submissions here. One of the problems I had was that the form would redirect to the new post after submission. But as that submission was set to pending the users would get a no page found error and proceed to retry their submissions multiple times.  Hence the up to six identical posts being submitted by users. Below is a quick fix to the WordPress User Frontend Page Submit error issue and bit extra.

Add this piece of code to your functions.php to redirect user to submission page.

 

You can also redirect the user to a page or post by simply adding the page/post id to “$post->ID=X”, where “X” will be the page id.

 

You can find your page/post id by visiting the page/post page and hovering over the title or “edit”.