WordPress – Contributor Can’t Add Media or Featured Image to Posts or Events

WP Article: http://wordpress.stackexchange.com/questions/77613/allow-contributor-role-to-upload-images-and-not-edit-already-published-articles

Plugin: https://wordpress.org/plugins/user-role-editor/

Used the User Role Editor plugin and had to change one setting to allow this functionality. After installation, go to “Users”, “User Role Editor”, Select Contributor from the drop down and check the box “upload files”. Click update and it’s done. Can be managed as multi-site or individual sites.

if ( current_user_can(‘contributor’) && !current_user_can(‘upload_files’) )
add_action(‘admin_init’, ‘allow_contributor_uploads’);

function allow_contributor_uploads() {
$contributor = get_role(‘contributor’);
$contributor->add_cap(‘upload_files’);
}

Leave a Reply