Support

Account

Home Forums Front-end Issues Frontend form image upload – Not working although role capability set

Solving

Frontend form image upload – Not working although role capability set

  • 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?

  • Can anybody help?

  • 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.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Frontend form image upload – Not working although role capability set’ is closed to new replies.