Multisite: Use SuperSide Me Settings From the Main Site Everywhere

If you are using a multisite install of WordPress and want to use SuperSide Me, you absolutely can (please buy the license which matches the number of sites using the plugin). By default, each site will be able to use the Customizer and settings pages. If you would like to change that, however, you can.

To disable the plugin settings and Customizer panel for all sites except the main site, add these filters to your site or functions.php file:

// Disable the SuperSide Me settings page and customizer panel on child sites
if ( ! is_main_site() ) {
	add_filter( 'supersideme_disable_customizer_panel', '__return_true' );
	add_filter( 'supersideme_disable_settings_page', '__return_true' );
}Code language: JavaScript (javascript)

To use the plugin settings from the main site on all child/sub sites, add this filter to your theme (make sure it’s where all sites have access to it):

add_filter( 'supersideme_get_plugin_setting', 'prefix_supersideme_use_main_site_setting', 20 );
/**
 * In a multisite setup, use the main site settings for all child sites.
 *
 * @param $setting
 *
 * @return array
 */
function prefix_supersideme_use_main_site_setting( $setting ) {
	if ( is_main_site() ) {
		return $setting;
	}
	$main_site = get_network()->site_id;

	return wp_parse_args( get_blog_option( $main_site, 'supersideme' ), $setting );
}Code language: PHP (php)

You’ll be able to make any changes you like on the main site, and the child/sub sites will use those settings automatically.

Return to SuperSide Me