Skip Navigation

[Resolved] How to add delete post linl/button for users delete post within a view loop?

This support ticket is created 4 years, 5 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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by michaelR-26 4 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1689335
Annotation 2020-07-06 132509.png

I added this to the views loop

[cred-delete-post type="button" onsuccess="1397" action="delete"]Delete this[/cred-delete-post]

When logged in as a USER it shows a delete button next to the post but clicking on it does not delete the post. Just says "Something went wrong, please reload the page and try again."

When logged in as an ADMIN, it works.

#1689781

Hello,

This should be the same problem as your anther thread:
https://toolset.com/forums/topic/give-logged-in-user-access-to-media-library-but-no-other-admin-areas/#post-1689777

The [cred-delete-post] shortcode is using AJAX to submit the delete link, you can try the same solution as above thread, and test again

#1690219

My issue is resolved now. Thank you!