• Hi,
    We have created user roles with user role editor and assigned capabilities such as create, delete posts etc.But I am unable to delete articles(posts) which we have created with knowledge base plugin except administrator (dashboard user).

    Rest user cannot able to delete posts as well as redirect to home page rather than given redirected page.

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    1st check if user can delete articles at /wp-admin back-end.
    Do you can delete article from the back-end? If you can not delete your own articles check ‘delete_published_posts’ capability.
    If article was written by other user then ‘delete_others_posts’ is required to delete it.

    Thread Starter cv

    (@cv)

    Hi,

    The user type cannot see dashboard, but we had assigned capability User cannot
    delete_published_posts and delete_others_posts already, but not working while deleting posts from frontend,it always redirect to the home page.

    We try to delete self post as well as other author post.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    Can admin delete articles from front-end? If admin user is redirected to a wrong page, it’s not a permissions issue. Look at the redirection part.

    Thread Starter cv

    (@cv)

    Yes admin able to delete articles/post from front-end and after that it goes to redirected to custom page.But the user that has capability like delete post, edit post, delete other post etc. trying to delete they can’t delete post also redirect to home page.

    Let assume it may be redirection issue but what about they can’t delete the article , and same code admin able to delete it.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    What plugin or theme provide this “delete” functionality for front-end at your site?

    Thread Starter cv

    (@cv)

    We are not using any plugin for that we just make it by wp core function wp_delete_post() and wp_trash_post( $post_id ) .

    Both are working well for admin(dashboard) but problem arising for user role(custom role) such as super_admin, admin etc.

    Reference :

    https://clicknathan.com/web-design/wordpress-authors-front-end-delete/
    https://codeandme.net/deleting-post-from-front-end-in-wordpress/

    Do you suggest any plugin for that?

    • This reply was modified 7 years ago by cv.

    Did you find any solution? I am having the exact same problem. Users can not delete their own posts from the frontend even though the permissions are set correctly. I am using get_delete_post_link() to create the delete link but it always just redirects to the home page.

    Patrick

    (@pskinner1972gmailcom)

    I also have this problem.

    Capabilities are set correctly but still only admin can delete their post.

    I did find that if I set user capability so they can ‘Delete users’ – this solved the problem and users could then delete post from the front end

    Can’t really allow user to be able to delete other user though!!!

    Can we have some help on this ?

    Thanks
    p

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Not able to delete article(post) from front end’ is closed to new replies.