Change WordPress user roles and capabilities Forums How to or FAQ Restrict access by role to Quick Edit functionality on post listing screens? Reply To: Restrict access by role to Quick Edit functionality on post listing screens?

#2670
Vladimir
Keymaster

Hi,

Add this code to the active theme’s functions.php file:


if (current_user_can('your-specific-role-id')) {
    add_filter('post_row_actions','remove_quick_edit',10,1);
}
function remove_quick_edit( $actions ) {
    
    unset($actions['inline hide-if-no-js']);
    
    return $actions;    
}