Skip Navigation

[Resolved] Setting Author role to not be able to edit their published posts

This support ticket is created 5 years, 6 months ago. 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.

Tagged: 

This topic contains 1 reply, has 1 voice.

Last updated by Bob Dowdy 5 years, 6 months ago.

Author
Posts
#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