Skip Navigation

[Resolved] Is there a shortcode to restore a deleted post from a view?

This thread is resolved. Here is a description of the problem and solution.

Problem:

Change a trashed post to publied status.

Solution:

You can try Toolset Forms plugin, for example:

https://toolset.com/forums/topic/is-there-a-shortcode-to-restore-a-deleted-post-from-a-view/#post-1495697

Relevant Documentation:

This support ticket is created 4 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by MichaelR9215 4 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1495281

This is a simple inquiry. I will repeat the title of my request...

Is there a shortcode to restore a deleted post from a view?

Thanks!

#1495697

Hello,
I assume you are going to change a trashed post to publied status.

You can try Toolset Forms plugin:
1) Create a post view:
- Query posts
- Fitler by post status filter:
Select posts with status of trash
- In view's loop, display below form shortcode

2) Create a post form for editing post
- Option "Set this post status" choose "Published"
- in section "Form editor", display only two items: "Form message" + "Submit button"

After user submit the form, it will be able to change post status to published.

#1501917
mvs-restore.JPG

Luo,

This solution does not work. I created the post view that displays only trashed posts. I created the form with only the messages and submit button, and placed the form shortcode inside the loop for each trashed item.

When I submit the form for one of the trashed items, it does not restore the post ... it creates an auto draft. I will attach a photo, so you can see.

#1502541

It is supposed to work, please make sure your are using a post form for editing post.
If you still need assistance for it, please provide a test site with the same problem, also point out the problem page URL and form URL, I need a live website to test and debug.

#1513635

My issue is resolved now. Thank you!