Skip Navigation

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

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.

Our next available supporter will start replying to tickets in about 7.12 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by michaelR-26 5 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#1689335

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

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

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!