• Hi,

    I have a multisite network with WP Ultimo, another plugin which enables users to create their own site in the network. I have installed SuperPWA and it seems to work fine. But I would like it to be used on a specific page which is available on every site created in the network. So that the users can then use PWA on that specific page.
    As it is right now the default is Home Page.

    I would like to set settings that makes a new site have the same settings.
    Really I would like to set all the settings globally. So that the name is the same on all sites in the network. But the home page have to link to the specific page on the site itself.

    Is this possible?

    Thank you!

Viewing 1 replies (of 1 total)
  • aedelgod

    (@aedelgod)

    Hey @jockebq

    I use this plugin too on a multisite, however, what you are asking for is not out of the box, but it does have some multisite support built-in, just not for the options. I see a lot of the code in basic-setup.php and there is its own multisite.php, so basically all you need to do it make the options work the same way, so what you can do, and I have done with other plugins is take the code as is and modify it as a separate plugin and add the multisite vars to functions to try and make it network-friendly such as:

    public function function_name($network_wide) {
    		parent::function_name($network_wide);

    Then you would need to make sure the options you want are inherited and maybe go further and add a toggle option to override network settings per site if you want.

    	if ( is_multisite() ) {
    		$inherit_option = get_option( 'superpwa_inherit_settings' );
    		$inherit        = true;
    
    		if ( ! is_network_admin() && '0' === $inherit_option ) {
    			$inherit = false;
    		}
    
    		echo '<h1>Using global settings: ' . ( $inherit ? 'YES' : 'NO' ) . '</h1>';
    	}

    I haven’t inspected the code of this plugin too much so you’d have to probably dig a lot more than I did and make sure it creates the options in wp_options for each site as they would if they were activated independently if you choose to do this while also having them in network_options, and definitely do this on a staging server if you end up exploring it.

    What I still do is activate the plugin on a per-site basis which works fine for me. I’m not sure about your situation but the biggest multisite I manage is 30 sites and since the config is pretty simple it doesn’t bother me not to have globals for these settings as each site is unique as well.

Viewing 1 replies (of 1 total)
  • The topic ‘Multisite network, specific page on each network?’ is closed to new replies.