Force all BP pages to a secondary site in BP multi-network?
-
WP 4.6.1
BP 2.6.2
BP Multi Network 0.1.1Does anyone know how to force all BP pages to a secondary site/subdomain within each BP network?? like in:
Supposedly, I have to define the desired BP $site_id for each network_id within a mu-plugin.
So far, I got this from https://codex.buddypress.org/getting-started/customizing/changing-internal-configuration-settings/
But, I know its incomplete, so what is missing here?:<?php /* Set which site ID BuddyPress will run on in each network: * https://make.wordpress.org/core/tag/4-6+dev-notes/page/2/ */ function pl_bp_network_site_filter global $wpdb; if ( $wpdb->siteid = 1 || define ( 'BP_ROOT_BLOG', $site_id ) ); // Define this function for sharing BP throughout/across the sites of this network //define ( ‘BP_ENABLE_MULTIBLOG’, true ); if ( $wpdb->siteid = 2 || define ( 'BP_ROOT_BLOG', $site_id ); // Define this function for sharing BP throughout/across the sites of this network //define ( ‘BP_ENABLE_MULTIBLOG’, true ); if ( $wpdb->siteid = 3 || define ( 'BP_ROOT_BLOG', $site_id ); // Define this function for sharing BP throughout/across the sites of this network //define ( ‘BP_ENABLE_MULTIBLOG’, true ); add_filter( 'bp_get_root_site_id', 'filter_root_site_id' ); // return site ID integer } } /** * Call when the plugin is activated */ register_activation_hook(__FILE__, 'define-BP-root');
Anyone else looking for the same solution?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.