Hello!
I have the issue, that users can not upload images to the post in the front end.
I added a new user role and attached the capabilities “upload_files” and “edit_post”.
Then it works. But as this user group should have no access to the backend, I forbid it with this function:
function themeblvd_redirect_admin(){
if ( current_user_can( ‘myusergroup’ ) ){
wp_redirect( site_url() );
exit;
}
}
add_action( ‘admin_init’, ‘themeblvd_redirect_admin’ );
The problem is, that now the image upload does not work. How can I achieve that the user group can upload media but has no access to the backend?
Thanks!
Does nobody have any idea?
Hello jobo21 to upload on front-end rule that works is admin or editor so you can check the permissions of these users and enable only rule you need.