{"id":732,"date":"2017-10-20T22:05:59","date_gmt":"2017-10-20T22:05:59","guid":{"rendered":"https:\/\/buddydev.com\/docs\/?p=732"},"modified":"2017-10-20T22:09:05","modified_gmt":"2017-10-20T22:09:05","slug":"multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs","status":"publish","type":"post","link":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/","title":{"rendered":"WordPress Multisite &#038; BuddyPress Multiblog mode member type synchronization across all blogs"},"content":{"rendered":"<p>When you are using <strong>BuddyPress with multisite and multiblog mode enabled<\/strong>, you will notice that<strong> member types for users are not synchronized across all blogs<\/strong>.<\/p>\n<p>The problem arises due to <strong>ByddyPress multiblog mode<\/strong>. In this case, BuddyPress treats all blogs as the root installation of BuddyPress. \u00a0Since the user to member type association is stored on the root blog, in this case, It is stored on the blog where the user&#8217;s member type update was made.<\/p>\n<p>So the member type of user on blog 1 will not be visible on blog 2 and if you made some change on blog 1, It will only be visible there.<\/p>\n<h3>Using Global Association:-<\/h3>\n<p>To alleviate it and use the global association, we can instruct BuddyPress to use the association from one of the blogs as the source of truth and all changes should be stored there.<\/p>\n<p>Here is the code that you can put in your bp-custom.php to do that.<\/p>\n<pre class=\"lang:php decode:true \">\/**\r\n * Fix the synchronization of the member types across all blogs on multisite, multiblog mode.\r\n *\/\r\nfunction buddydev_fix_multiblog_taxonomy_site_id( $blog_id ) {\r\n\t$blog_id = BLOG_ID_CURRENT_SITE; \/\/ Change it.\r\n\t\/\/ Put the blog id you want all the member type associations with user to be saved\r\n\t\/\/ If you have existing association, you may want to use that\r\n\treturn $blog_id;\r\n}\r\nadd_filter( 'bp_get_taxonomy_term_site_id', 'buddydev_fix_multiblog_taxonomy_site_id' );<\/pre>\n<p>Here I have used the main blog id of the network as the source for storing\/retrieving the user to member type associations.<\/p>\n<p>You can use a different blog id if you have existing user with member types associated on that blog. I will recommend sticking to the main site though.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you are using BuddyPress with multisite and multiblog mode enabled, you will notice that member types for users are not synchronized across all blogs. The problem arises due to ByddyPress multiblog mode. In this case, BuddyPress treats all blogs as the root installation of BuddyPress. \u00a0Since the user to member type association is stored &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9307],"tags":[],"class_list":["clearfix","post-732","post","type-post","status-publish","format-standard","hentry","category-buddypress-member-types-pro"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WordPress Multisite &amp; BuddyPress Multiblog mode member type synchronization across all blogs &#8226; BuddyDev Help Center<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress Multisite &amp; BuddyPress Multiblog mode member type synchronization across all blogs &#8226; BuddyDev Help Center\" \/>\n<meta property=\"og:description\" content=\"When you are using BuddyPress with multisite and multiblog mode enabled, you will notice that member types for users are not synchronized across all blogs. The problem arises due to ByddyPress multiblog mode. In this case, BuddyPress treats all blogs as the root installation of BuddyPress. \u00a0Since the user to member type association is stored ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/\" \/>\n<meta property=\"og:site_name\" content=\"BuddyDev Help Center\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-20T22:05:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-10-20T22:09:05+00:00\" \/>\n<meta name=\"author\" content=\"Brajesh Singh\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brajesh Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/\",\"url\":\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/\",\"name\":\"WordPress Multisite & BuddyPress Multiblog mode member type synchronization across all blogs &#8226; BuddyDev Help Center\",\"isPartOf\":{\"@id\":\"https:\/\/buddydev.com\/docs\/#website\"},\"datePublished\":\"2017-10-20T22:05:59+00:00\",\"dateModified\":\"2017-10-20T22:09:05+00:00\",\"author\":{\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\"},\"breadcrumb\":{\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/buddydev.com\/docs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress Multisite &#038; BuddyPress Multiblog mode member type synchronization across all blogs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/buddydev.com\/docs\/#website\",\"url\":\"https:\/\/buddydev.com\/docs\/\",\"name\":\"BuddyDev Help Center\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/buddydev.com\/docs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\",\"name\":\"Brajesh Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/buddydev.com\/docs\/#\/schema\/person\/image\/\",\"url\":\"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon\",\"contentUrl\":\"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon\",\"caption\":\"Brajesh Singh\"},\"sameAs\":[\"http:\/\/buddydev.com\/members\/sbrajesh\/\",\"https:\/\/x.com\/sbrajesh\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress Multisite & BuddyPress Multiblog mode member type synchronization across all blogs &#8226; BuddyDev Help Center","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/","og_locale":"en_US","og_type":"article","og_title":"WordPress Multisite & BuddyPress Multiblog mode member type synchronization across all blogs &#8226; BuddyDev Help Center","og_description":"When you are using BuddyPress with multisite and multiblog mode enabled, you will notice that member types for users are not synchronized across all blogs. The problem arises due to ByddyPress multiblog mode. In this case, BuddyPress treats all blogs as the root installation of BuddyPress. \u00a0Since the user to member type association is stored ...","og_url":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/","og_site_name":"BuddyDev Help Center","article_published_time":"2017-10-20T22:05:59+00:00","article_modified_time":"2017-10-20T22:09:05+00:00","author":"Brajesh Singh","twitter_misc":{"Written by":"Brajesh Singh","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/","url":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/","name":"WordPress Multisite & BuddyPress Multiblog mode member type synchronization across all blogs &#8226; BuddyDev Help Center","isPartOf":{"@id":"https:\/\/buddydev.com\/docs\/#website"},"datePublished":"2017-10-20T22:05:59+00:00","dateModified":"2017-10-20T22:09:05+00:00","author":{"@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb"},"breadcrumb":{"@id":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/buddydev.com\/docs\/buddypress-member-types-pro\/multisite-buddypress-multiblog-mode-member-type-synchronization-across-blogs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/buddydev.com\/docs\/"},{"@type":"ListItem","position":2,"name":"WordPress Multisite &#038; BuddyPress Multiblog mode member type synchronization across all blogs"}]},{"@type":"WebSite","@id":"https:\/\/buddydev.com\/docs\/#website","url":"https:\/\/buddydev.com\/docs\/","name":"BuddyDev Help Center","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/buddydev.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb","name":"Brajesh Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/buddydev.com\/docs\/#\/schema\/person\/image\/","url":"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon","contentUrl":"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon","caption":"Brajesh Singh"},"sameAs":["http:\/\/buddydev.com\/members\/sbrajesh\/","https:\/\/x.com\/sbrajesh"]}]}},"_links":{"self":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/comments?post=732"}],"version-history":[{"count":3,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/732\/revisions"}],"predecessor-version":[{"id":735,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/posts\/732\/revisions\/735"}],"wp:attachment":[{"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/media?parent=732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/categories?post=732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buddydev.com\/docs\/wp-json\/wp\/v2\/tags?post=732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}