I'm using the Multisite functionality of WordPress 3.0, and I have a network of sites built where I display one random post from one of the subsites on the main site's front page. I accomplish this, in part, by using the switch_to_blog
function from the old WPMU function list.
Up until yesterday I could call a function that called switch_to_blog
, created an array, added the blog's name, the post details, the post thumbnail, etc. to the array, and then used restore_current_blog
to jump back to the main blog's context. Then I used that array to echo out the things I needed for that post I grabbed. It worked fine.
All of a sudden, when I call switch_to_blog
and then from within that block I call bloginfo()
just to test it, it still echoes the name of the top level blog, and NOT the switched to blog.
Is that function completely deprecated and unworkable due to random bugs? Anyone have any insight or ideas to get around it, or do I need to write a custom $wpdb->get_results();
query to get around this?
Thanks!