Are you running a WordPress website with bunch of contributors who are willing to post on your website? If yes then this article contains a great tip for you.
As I mention on previous articles, every post on your blog must contain at least one image related to the article. It's really great for SEO and other things.
This code will help us to allow users with contributor role to upload images on your WordPress site.
Add this code to your functions.php file:
As I mention on previous articles, every post on your blog must contain at least one image related to the article. It's really great for SEO and other things.
This code will help us to allow users with contributor role to upload images on your WordPress site.
Add this code 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');
}