Allow Contributors to Upload Images in WordPress

You are here: Home » Blog » CMS » WordPress » Allow Contributors to Upload Images in WordPress

Allow Contributors to Upload Images in WordPress

Allow Contributors to Upload Images in WordPress: By default, WordPress does not permit contributor accounts to upload images.

You can, of course, promote that particular account to Author or Editor and this will give them the rights to upload and modify images.

However, it will also grant them additional rights, such as the ability to publish their own articles (as opposed to submission for review).

This particular code snippet allows contributor accounts to upload images to their articles, without granting them any additional privileges or rights. Paste it in the functions.php file of your theme:

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


Related Posts:

Show Post Thumbnails in RSS Feed – WordPress

Disable the Admin Bar in WordPress

Formatting Text in WordPress Posts (Tiny MCE Advanced for WordPress)

Should I Choose a Hosted or Non-hosted Blogging Platform?

WordPress, SEO, and Social Media Marketing

Change the Author Permalink Structure

How do I install plugins in WordPress?

Choose your preferred blog CMS platform

Protect Your Site from Malicious Requests

WordPress by the Numbers Facts

Paginate Your WordPress Site Without Plugins

Create a PayPal Donation Shortcode – WordPress

WordPress Posts vs Pages

Show Popular Posts Without Plugins

Automatically Link to Twitter Usernames in Content

How do I create money online using WordPress?

How to Update: Automatically create media_buttons for shortcode selection

Disable Search in WordPress

Using the Current Year in Your Posts – WordPress

 

By |2019-02-08T19:25:57-04:00March 19th, 2018|Categories: CMS, WordPress|Tags: , , , , , , , |

About the Author:

I am a loving father, & husband. I am a computer enthusiast. I have used and enjoyed computers since I was young and I enjoy teaching young minds how to code, because it teaches them how to think. Today with YouTube, and social media garbage our youth are losing the ability to think on their own and solve problems. I believe this is a serious epidemic as kids today dont understand that technology is a tool. This tool is being abused, and its underlying effects are taking its toll on kids behaviour, and learning.