Howdy,
Scratching my head with the user role ’employer’ frontend file upload permission issue that is You don't have permission to attach files to this post.
The user role is created by wp job manager plugin. I have the same problem as other support thread, but none worked for me.
1. https://support.advancedcustomfields.com/forums/topic/front-end-media-upload-capabilities-issue/
2. https://support.advancedcustomfields.com/forums/topic/frontend-form-custom-role-cant-upload-picture/
I changed the permission to like below:
add_action('wp', 'allow_employer_uploads');
function allow_employer_uploads() {
$employer = get_role('employer');
// author caps
$employer->add_cap('edit_published_posts');
$employer->add_cap('delete_posts');
$employer->add_cap('edit_posts');
$employer->add_cap('upload_files');
// editor caps
$employer->add_cap('edit_others_posts');
}
but still the same problem.
Any better idea?
Thanks
Finally, I did it adding edit_published_pages
capability.