Hi
i got a new problème to upload a file as custom image field in front end form. I crate a role called ‘agency’, i added user roles editor to check capabilities but ‘upload_files’ is checked.
When i’m log as admin i can upload files, if i’m log with my agency account i can’t..
there is some special capabilities to add to my custom role tu uploads files on frontend form ?
Thanks for answer
Hi @gfardoux
I think you need the edit_posts capabilities too to make it works. The easiest way to test is to copy the capabilities from the editor or author role. After that, you can disable the capabilities one by one to see which one is the right capability to use.
I hope this helps.
hi @james
i tested with all capabilities checked.. and dident work :/
i tested to deleted my custom roles, and create it again by clone editor roles.. nothing work, only if i put my user agency in admin role..
i found my problem, it was because i restrict admin area to my agency role with this :
function restrict_access_administration(){
if ( current_user_can(‘agency’) ) {
wp_redirect( get_bloginfo(‘url’) );
exit();
}
}
how can i restrict admin area without disturb front upload media please ?
yes thanks James, i found another way working ! thanks for help 🙂