I don’t think this can currently be achieved, however, it wouldn’t be hard to code something to accomplish it.
Well, I am currently modifying the bbp-forum-index shortcdde so that it will take a site id as an optional parameter.
This is the method I have so far, but I am not sure how to call the bbp_has_forums() on the other site, as I do not know a huge amount of php
Any help would be appreciated
public function display_forum_index( $attr, $content = '' ) {
global $bbp;
if ( !empty( $content ) || !is_numeric( $attr['id'] ) ) )
return $content;
if ( empty( $attr['id'] )
{
$current_site = get_current_site();
$site_id = $current_site->id;
}
else
{
$site_id = $attr['id'];
}
// Unset globals
$this->unset_globals();
// Start output buffer
$this->start( 'bbp_forum_archive' );
// Breadcrumb
bbp_breadcrumb();
// Before forums index
do_action( 'bbp_template_before_forums_index' );
// Load the forums index
if ( bbp_has_forums() )
bbp_get_template_part( 'bbpress/loop', 'forums' );
// No forums
else
bbp_get_template_part( 'bbpress/feedback', 'no-forums' );
// After forums index
do_action( 'bbp_template_after_forums_index' );
// Return contents of output buffer
return $this->end();
}
Don’t modify the core function. Makes a plugin and make your own Shortcodes instead. You’ll need to look into how switch_to_blog works. You’ll also need to see how my Switch Site Rewrite plugin reloads the permalinks for each switch. The reason this isn’t in core is its a labor intensive set of requests for the server to pull off, particularly across multiple servers or data centers in large installations.
Thanks for the help.
I did not end up having to reload the permalinks but that may something to do with my site settings.
I also turned it into a plugin which can be seen here
http://pastebin.com/2mDe0qpW
It is set up so that
[bbp-forum-header]
[bbp-forum-site-index id=8]
[bbp-forum-site-index id=7]
[bbp-forum-footer]
will provide a single list of all forums on sites 8 and 7 if anyone else would like to try it
I know its been 3 years but just wondering if theres been any development on this? @trobee your code a script still work. Just wondering if you still after 3 years, have the single list shortcodes available? I would really appreciate it!