You Are Here: Home » How-To » Wordpress

How To Add / Remove File Upload Support Or Other Capabilities For Contributors In WordPress

By Debjit on March 22nd, 2015 
Advertisement

WordPress is one of the best blogging platforms out there. It is so good, that even major publishing houses use the WordPress.org free software to manage their online publications. When, you run a multi author blog using website, you need to take care of author permissions at times.

By default WordPress has a couple of user permissions which have certain restrictions on each. For instance, the Contributor user can add new posts but is not able to add or upload images.

A blog post without an image is so meaningless. So, in this article we will tell you two methods in which you could add image upload support for less privileged users on WordPress (like Contributors, Authors and Subscribers).

Method 1: Theme Change

Add the following function / code snippet at the end of your theme's functions.php file just before the php closing tag:

function contri_up() { 
 $role = get_role( 'contributor' ); //gets the contributor role 
 $role->add_cap( 'upload_files' ); //would allow the contributor to upload files 
} 
add_action( 'admin_init', 'contri_up');

The method described above will only work only for a particular theme. If you change your theme template, you need to add these changes to the functions.php file of your theme again.

Method 2: Plugin

This is the most versatile way to go about adding or removing support for uploading files for Contributor users on your wordpress blog. All you need to do is install the File Upload Support For Contributors plugin. This plugin will help you to add and remove support for uploading files for Contributor users.

Advertisement







How To Add / Remove File Upload Support Or Other Capabilities For Contributors In WordPress was originally published on Digitizor.com on February 18, 2012 - 10:08 pm (Indian Standard Time)