fbpx
How to Allow WordPress Contributors to Upload Images

How to Allow WordPress Contributors to Upload Images

This snippet will allow WordPress contributors to upload images to the site.

Instructions
Add this to your functions.php file.

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');
     }

WordPress Hosting

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Snippet Info

Tested with Wordpress v. 4.8
Last Modified: 15.05.2018
Last Reviewed: 15.05.2018

How to Allow WordPress Contributors to Upload Images
4.4 (88%) 5 vote[s]
Please report broken snippets.
Report Broken Snippet
WordPress Hosting

Recent Comments