Specific post user permissions

in that gives a specific user the option
Edit a specific post
I searched and found only plug-in that give the user the option to edit all posts
But I did not see anything reference to a specific post
I tried to use as a plug-in “user permissions” but unfortunately it does not save my settings
Thank you

Related posts

1 comment

  1. You can conditionally control which user role has the capability to edit posts

    edit_posts
    

    By default, contributors can edit their posts however you can add or remove capabilities for different roles and user i.d’s.

    add_action( 'init', 'new_role_edit_posts' ); 
    
    function new_role_edit_posts() {
    
    if ( is_single('007') {
    
    $role = get_role( 'new-role' );
    $role->add_cap( 'edit_posts' );
        }
    }
    

    This enables the new user role named new-role to edit the single post with the post i.d of 007

    You will need to create a new role named new-role

Comments are closed.