Phone: 1-855-839-9966

WordPress: Allowing Contributor Or Author To Upload Pictures

Home » Wordpress Tips » WordPress: Allowing Contributor Or Author To Upload Pictures
Share this article on Facebook Share this on Twitter Stumble this article Share this on Google+ Share this on LinkedIn

Posted by Dave Lauretti on March 6, 2011

I just finished writing a post that will give you simple instructions for your WordPress blog on how to hide the media tab from the uploads dialog box on the post page for contributors – good – but we still want our WordPress contributors to be able to upload media such as images correct? Correct! There’s nothing like a nice article with a nice image and who wants to read simple plain text all the time? I don’t.

So if you allow people to join your WordPress blog website and contribute you will want to add the following code to the functions.php file in your theme directory:

if ( current_user_can('author') && !current_user_can('upload_files') )
add_action('admin_init', 'allow_contributor_uploads');

function allow_contributor_uploads() {
$contributor = get_role('author');

Very simple. For clarity, open functions.php in your theme directory, add the above code to the bottom of your code blocks and from here on in, contributors/authors will be able to upload images with their posts.


Get A Call Back

Latest SEO News and Tips