I'm getting really frustrated with this issue I am having with WP multisite.
The idea is, I have a multisite and it is here where all posts are created then just shared down to the other sites using ACF field.
Here is a part of the code where the issue happens:
switch_to_blog(1);
$person= get_posts( $args );
foreach($person as $post) {
echo get_current_blog_id(); THIS WILL DISPLAY 1
$person_info = get_field('person_info', $post->ID);
echo get_current_blog_id() ; THIS WILL DISPLAY THE CURRENT SITE, THE SITE JUST GOT RESTORED
}
restore_current_blog();
Can anybody help me figure out what is happening please? TIA