Home › Forums › Add-ons › Gallery Field › how to display the images from the gallery › Reply To: how to display the images from the gallery
You need to amend the permissions by editing the role to allow subscribers or contributors to upload files
Something like the below may work for a contributor, edit for subscribers too:
add_action('init', 'wp_allow_contributor_uploads');
function wp_allow_contributor_uploads() {
if ( current_user_can('contributor') && !current_user_can('upload_files') ){
$contributor = get_role('contributor');
$contributor->add_cap('upload_files');
}
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.