Home › Forums › ACF PRO › Pass data from the main site to multisite › Reply To: Pass data from the main site to multisite
The main issue with getting a field value from the main site is that the field in question must be defined on every site in order to use the value from the main site, there are several ways that this can be accomplished.
If the field exists on both the site being shown and on the main site then you simply need to use switch_to_blog() before getting the value.
If the fields are not defined on both sites then you need to use switch_to_blog() and then use get_post_meta() or get_option() or some other function in WP to get the values of the fields.
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.