WordPress 3.5 is actually overhauling the switch_to_blog() function (<a href="http://core.trac.wordpress.org/ticket/21434">http://core.trac.wordpress.org/ticket/21434</a>) to fix some of those performance issues so using it shouldn&#39;t be an issue but as mentioned this could be slow if the multisite instance is large.<div>
<br></div><div><div><a href="http://wordpress.org/news/2012/09/wordpress-3-5-beta-1/">http://wordpress.org/news/2012/09/wordpress-3-5-beta-1/</a><br><br><div class="gmail_quote">On Fri, Sep 28, 2012 at 7:42 AM, Martha Burtis (mburtis) <span dir="ltr">&lt;<a href="mailto:mburtis@umw.edu" target="_blank">mburtis@umw.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I&#39;d recommend using the Sitewide Tags plugin (<a href="http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/" target="_blank">http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/</a>) to create a Tags blog. This will, essentially, repost every public post in one place, maintaining information about the original author and permalink. Then you can grab a feed of the tag/category from the Tags blog. We use this at UMW to aggregate posts from around our entire multisite installation that use a particular course tag/category. <div>
<br></div><div><div>Beware of the switch_to_blog function -- it&#39;s all but deprecated and can cause performance issues. </div><div><br></div><div>HTH,</div><div>Martha</div><div><div class="h5"><div><br></div><div><br>
</div><div><br><div><div>On Sep 28, 2012, at 8:50 AM, Jonathan Cox wrote:</div><br><blockquote type="cite"><div>Check out <a href="http://codex.wordpress.org/Function_Reference/switch_to_blog" target="_blank">http://codex.wordpress.org/Function_Reference/switch_to_blog</a> and <a href="http://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters" target="_blank">http://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters</a><br>
<br>I&#39;d do something like<br><br>foreach ( $blog_ids as $blog ) :<br>    switch_to_blog( $blog );<br>    $the_query = new WP_Query( &#39;tag=whatever-tag&#39; );<br>    while ( $the_query-&gt;have_posts() ) :<br>        $the_query-&gt;the_post();<br>
        sprintf( &#39;&lt;h1&gt;&lt;a href=&quot;%s&quot;&gt;%s&lt;/a&gt;&lt;/h1&gt;&#39;, get_permalink(), get_the_title() );<br><span style="white-space:pre-wrap">        </span>// more the_loop stuff here if you want<br>    endwhile;<br>
endforeach;<br><br>The initial blog would need to be restored after the foreach block, but I can&#39;t say offhand if restore_current_blog() will restore it or the penultimate blog.<br><br>It obviously becomes less efficient the more blogs you switch to and the more posts you pull.<br>
<br>Jonathan Cox<br>VCU Webmaster<br>Technology Services<br><a href="tel:%28804%29%20827-0067" value="+18048270067" target="_blank">(804) 827-0067</a><br><br>On Sep 27, 2012, at 10:18 AM, Grogan, David wrote:<br><br><blockquote type="cite">
Hello all,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Does anyone have a solution for this use case?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Given a subset of sites in our multi-site instance of WordPress, list the posts across those sites that have been specific tag or category.<br>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">David<br></blockquote><blockquote type="cite"><br></blockquote>
<blockquote type="cite">--------------------------------------------------------------<br></blockquote><blockquote type="cite">David Grogan<br></blockquote><blockquote type="cite">Senior Solutions Specialist<br></blockquote>
<blockquote type="cite">Educational &amp; Scholarly Technology Services (ESTS)<br></blockquote><blockquote type="cite">University Information Technology (UIT) Tufts University<br></blockquote><blockquote type="cite">108 Bromfield Rd <br>
</blockquote><blockquote type="cite">Somerville, MA  02144<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Phone: <a href="tel:617.627.2859" value="+16176272859" target="_blank">617.627.2859</a><br>
</blockquote><blockquote type="cite">Fax: <a href="tel:617.627.3082" value="+16176273082" target="_blank">617.627.3082</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://uit.tufts.edu/at/" target="_blank">http://uit.tufts.edu/at/</a><br>
</blockquote><blockquote type="cite"><a href="http://sites.tufts.edu/davidgrogan" target="_blank">http://sites.tufts.edu/davidgrogan</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">wp-edu mailing list<br>
</blockquote><blockquote type="cite"><a href="mailto:wp-edu@lists.automattic.com" target="_blank">wp-edu@lists.automattic.com</a><br></blockquote><blockquote type="cite"><a href="http://lists.automattic.com/mailman/listinfo/wp-edu" target="_blank">http://lists.automattic.com/mailman/listinfo/wp-edu</a><br>
</blockquote><br>_______________________________________________<br>wp-edu mailing list<br><a href="mailto:wp-edu@lists.automattic.com" target="_blank">wp-edu@lists.automattic.com</a><br><a href="http://lists.automattic.com/mailman/listinfo/wp-edu" target="_blank">http://lists.automattic.com/mailman/listinfo/wp-edu</a><br>
</div></blockquote></div><br></div></div></div></div></div><br>_______________________________________________<br>
wp-edu mailing list<br>
<a href="mailto:wp-edu@lists.automattic.com">wp-edu@lists.automattic.com</a><br>
<a href="http://lists.automattic.com/mailman/listinfo/wp-edu" target="_blank">http://lists.automattic.com/mailman/listinfo/wp-edu</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><br><br> Thanks,<br>Benjamin Robert Mueller<br><br>
</div></div>