Home › Forums › Front-end Issues › Same field for different pages on a multisite › Reply To: Same field for different pages on a multisite
So, I think I may understand what’s happening, maybe. Is the image associated with the user’s profile page? Or is this image added to some other page?
If it’s on the user profile page then it is save in the wp_usermeta table. Unlike the other tables in WP on a multisite where each site has it’s own table, on multisite all the sites still share the same _usermeta table. When you upload an image on site 2, that image is stored in the wp_2_posts table and associated with site 2. When you go to site 3, that image is not found in the wp_3_posts table, so the user does not have an image there. If you now upload an image on site 3, the image ID in the single _usermeta table is updated to point to the new image in the wp_3_posts table. This image ID does not exist in the wp_2_posts table so the image is not found there any more.
On a multisite installation, custom fields that have any type of a relationship to other tables are going to give you this problem. You will either need unique names for these fields on every site or you will need to only update the values on the main site and then switch to the main blog before getting these values with https://codex.wordpress.org/Function_Reference/switch_to_blog
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!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5
— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.