Support

Account

Forum Replies Created

  • Found this related question (after relentlessly changing search parameters):
    https://support.advancedcustomfields.com/forums/topic/multisite-location-rules-display-field-groups-on-specific-sites/ and got my answer in the question, didn’t even know rule matching filters existed!

    My sites live on subdomains, so I preferred to change the display list to use the blog (site) name rather than either their subdomain or path (mine were all “/”), so in the acf_location_rule_values_multisites function, I changed the the loop to show names instead.

    foreach( $sites as $site ) {
         $name = get_blog_details( array( 'blog_id' => $site->blog_id ) )->blogname;
         $choices[ get_object_vars($site)["blog_id"] ] = $name;
    }

    Note I put this function in the parent theme, child theme alone would’ve prevented it showing on other satellite sites not using the same child theme.

    I’m still choosing to make the field groups on each satellite site, though they are appearing available to sync on all the other satellite sites, though I can either just hit sync and have them all in (which shouldn’t matter since they’ll only show on the correct site anyway) or ignore them when syncing everything else to keep it clean).

Viewing 1 post (of 1 total)