Non-Admin Roles Cannot Delete Custom Posts
-
We have a site that has custom roles. These roles (trial, member) have been granted the capabilities
delete_posts
anddelete_published_posts
.We then use a simple link to allow users to delete their own posts:
<a onclick="return confirm('Are you sure you want to delete this scanner?')" class="btn btn-outline-danger w-100" href="<?php echo get_delete_post_link( $post->ID ) ?>">Delete Custom Scanner</a>
Unfortunately, this only works for admins. For any other users, it redirects to the home page without deleting the post.
Does anyone know what is incorrect here? Thank you!
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Non-Admin Roles Cannot Delete Custom Posts’ is closed to new replies.