Skip Navigation

[Gelöst] Setting Author role to not be able to edit their published posts

This support ticket is created vor 2 Jahre, 11 Monate. 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.

This topic contains 1 Antwort, has 1 Stimme.

Last updated by Bob Dowdy vor 2 Jahre, 11 Monate.

Author
Artikel
#1257615

Tell us what you are trying to do?
Setting Author role to not be able to edit their published posts. They can only publish - they cannot edit or delete. If you try to do this in Access, it forces you to allow them to do all three.

Is there any documentation that you are following?
I have found functions.php snippets I am testing.

---

Update:
I tried the following on a test stage and it seems to work fine. Will this cause any problems with Toolset going forward?

/* Testing Removing Author Permission to edit or delete own posts */

function wpb_change_author_role(){
global $wp_roles;
$wp_roles->remove_cap( 'author', 'delete_posts' );
$wp_roles->remove_cap( 'author', 'delete_published_posts' );
$wp_roles->remove_cap( 'author', 'edit_published_posts' );
}
add_action('init', 'wpb_change_author_role');

Also, why is it that I cannot achieve this through the Access plugin?

Thanks,
Corey

#1257647

Apologies, I realize now my original post was incomplete, I am resubmitting