How can I add a URL parameter to the REDIRECT of an Edit Post form?
The "Go to a page..." option for the "What to show after submitting the form:" feature only lets me select a page from a dropdown list... but what I would like to do is just have the ability to include the post ID (that has just been edited) in the REDIRECT URL.
After making an edit to the post, a redirect with something like hidden link and on that 'thank you' page I will place a View that looks for a URL variable so I can display something like "Thank you for editing the [TITLE GOES HERE] post".
I would have other variables on that thank you page, but the redirect URL param is what I am missing.
Thank you for that new Code Snippet feature! Works well!
I implemented your code (and changed the form ID) and the Post Form now redirects to the correct page BUT with the wrong URL parameter. This is currently the url when the form redirects:
hidden link
That 773 at the end is the POST FORM id... I need the POST ID that was just edited (not the form)... and how can I change "cred_referrer_form_id" to something like "productid"?
It should have added a parameter 'edited', it's the 9th line in the above snippet.
On my test site it added ?edited=123&cred_referrer_form_id=321, so if you are not seeing the edited parameter added it suggests either the code isn't running at all or the form ID is wrong...
MY FAULT: I needed to "Activate" the custom code... simply "Saving" does not "Activate" the code (and that's why it looked like the code didn't work properly). My issue is resolved now. Thank you!