If you WordPress site, have contributors users, there are some limitation. The big problem is your contributors can’t upload files on your WordPress site. The solutions of this problem is really simple. We need to add some functions in your current theme.
He we go what you should do. Open functions.php and write down this code
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');
}
This code original created by Ryan Margani, and shared by WP Cookies and WP Recipes. I hope our Today WordPress tips useful on you.




Pingback: Tweets that mention How to Allow Contributors to Upload Files in Wordpress # WordPress Tricks & Tips -- Topsy.com
Pingback: wp-popular.com » Blog Archive » How to Allow Contributors to Upload Files in Wordpress
Now thats a neat trick – thanks, really useful
I was wondering where do I need to add this code in the functions.php and how does it work. When I try to change the avatar on my site from an uploaded image to another it doesn’t change. I get an error on page. Is their any help out there. I’m using p2 automatic theme. Thanks
Pingback: Tiny Tips to Secure your Plugins | WordPress News Wire