How To Allow Contributors To Upload Images
In WordPress blogging system contributors i.e users cannot upload images for their posts. So In this tutorial im gonna show you how to allow contributors to post images in the post.
1. Go to the theme .
2. In theme open the functions.php file and add the following code in functions.php code.
[Normal_Box_Equal]
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’);
}
[/Normal_Box_Equal]
3. That’s it!!!



