Hi there,
I’m using acf_form to allow users to edit their profile on a WP multisite. I would like users to be able to upload a custom avatar on all of my sites (both parent and child). Specifically, I’d like users to modify their user meta on the parent site. I have something like this in place:
switch_to_blog(1);
acf_form($options);
restore_current_blog();
The above works fine for everything except images, two things happen:
- When I try to upload a file, I get the following error in the WP Media uploader: “Sorry, you are not allowed to upload files.”
- Previously uploaded media file don’t appear (the loading wheel just keeps going)
I’m using the User Role Editor plugin and have ensured that the upload_files
capability is enabled.
I would massively appreciate if someone has any ideas on how to:
The above works fine for everything except images, two things happen:
- Allow file uploads on a child site to the parent site via
acf_form
- Load media items from the parent site in the
acf_form
WP uploader whilst on the child site
Thanks in advance!