Glad to help. That currently is a Pro feature, but I think it’s something that also should be included in the free version. I’ve added this to the to-do list and will try to implement in a future version of the plugin.
In the meantime, you could add a link manually:
<a href="#user-submitted-posts" onclick="window.location = window.location.href.split('?')[0];return false;">Submit a new post</a>
That will reload the current page and remove the query parameters from the URL, so the form will be displayed fresh.
Thank you. So I suppose there is no simple way to just add this as an “echo” after
if (isset($_GET[‘success’]) && $_GET[‘success’] == ‘1’) {…
so it be visible only after a successful post and not all the time.
I am a beginner in terms of php, so no need for an elaborate answer. I can wait for the update or even purchase the pro version, but this is the only function that I really missed.
Appreciate it.
The code I provided is HTML, so can be added directly to a widget. The code you suggest is PHP, and must be included in an actual PHP file. So not something that can be added via widget. Of course, if you are able to edit theme files (i.e., work with PHP), then much more can be done in terms of when/where/how things are displayed and so forth.
Just to follow up, the next version of User Submitted Posts features a “reset form” shortcode that looks like this:
[usp-reset-button url="https://example.com/submit/"]
Thank you for the feedback on this idea.