You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is great, thank you for creating it. So easy to use.
I was doing a query from the main site in a network and I found that, during a loop, having two posts from the same child site would reset the current blog to the network.
The fix is to replace the "else" in switch_to_blog_while_in_loop() with:
else if ( ! ms_is_switched() )
... that way, if the current blog id is that of a child blog, it will stay there instead of switching back by using restore_current_blog().
The text was updated successfully, but these errors were encountered:
This is great, thank you for creating it. So easy to use.
I was doing a query from the main site in a network and I found that, during a loop, having two posts from the same child site would reset the current blog to the network.
The fix is to replace the "else" in switch_to_blog_while_in_loop() with:
... that way, if the current blog id is that of a child blog, it will stay there instead of switching back by using restore_current_blog().
The text was updated successfully, but these errors were encountered: