- Get link
- X
- Other Apps
Today's topic is how to allow contributor role to upload images and not edit already published articles. This post will help you to do that very easily.
For image upload option to contributors
Add this code in your current WordPress theme's functions.php
Now your WordPress contributor role user can upload images.
For image upload option to contributors
Add this code in your current WordPress theme's functions.php
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');
}
Now your WordPress contributor role user can upload images.
- Get link
- X
- Other Apps