Skip Navigation

[Resolved] Users can’t delete own post

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

Problem: Users in a custom role cannot delete their own posts using a delete post link created with the cred_delete_post_link shortcode.

Solution: Check the Access settings for this custom role and be sure "Delete own posts using Toolset Forms" is active.

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.

This topic contains 5 replies, has 3 voices.

Last updated by romanF 4 months, 2 weeks ago.

Assigned support staff: Christian Cox.

Author
Posts
#1559993

Hi there

We have a CPT for events. Our users (they have a custom role) can create, edit and delete their own posts. For creating and editing posts, we have a CRED form. That works fine.
For deleting posts, we use this code in the content template:

[cred_delete_post_link action='trash' message='Wollen Sie Ihren Event wirklich löschen?' message_show='1' class='cred-refresh-after-delete']<p>Event löschen</p>[/cred_delete_post_link]

Admins and editors can delete their own posts, but for the custom role, that link isn't showing up. I checked the rights to delete own posts in the access area and - because that didn't help - also checked all possible options in the advanced area that are somehow related to editing, publishing and deleting posts. But the delete-link still isn't showing up for our members.

Am I missing something?

Thanks for your help!

#1560411

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hello, can you tell me if the Events post type is in a post relationship with any other posts? If so, what are the permissions for this custom role and the related post types? For example, if Events is in a post relationship with another post type like Locations then what are the custom role permissions for Locations?

#1560415

Hi Christian
No, there are no relationships. The posts only have authors and one taxonomy each.

#1561833

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

If you have the "Delete own posts using Toolset Forms" permission checked in Access and the link still does not appear, there must be something else going on. May I log into wp-admin and take a closer look?

#1562249

Ah, of all the options, that's the one I didn't think about. I did not expect that this feature is connected to the forms permissions. "Delete own posts using Toolset Forms" did the trick.
Thanks Christian!

#1703531

Nice, I had the exact same issue. Good to see the solution was already out there!