{"id":4497,"date":"2023-03-07T16:18:21","date_gmt":"2023-03-07T16:18:21","guid":{"rendered":"https:\/\/ibex.tech\/wordpress-sites\/?p=4497"},"modified":"2026-04-10T14:27:02","modified_gmt":"2026-04-10T13:27:02","slug":"storing-custom-group-metadata","status":"publish","type":"post","link":"https:\/\/ibex.tech\/wordpress-sites\/plugins\/buddypress\/groups\/storing-custom-group-metadata","title":{"rendered":"Storing custom group metadata"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Write custom metadata<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  groups_update_groupmeta($GroupId, 'MyValueName', $MyValue);<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Read custom metadata<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  $MyValue = groups_get_groupmeta($GroupId, 'MyValueName');\n  if ($MyValue == \"\")    \/\/Will be \"\" if not stored\n    $MyValue = \"abc\";<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Delete custom metadata<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  groups_delete_groupmeta($GroupId, 'MyValueName');<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Write custom metadata Read custom metadata Delete custom metadata<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[360],"tags":[],"class_list":["post-4497","post","type-post","status-publish","format-standard","hentry","category-groups"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts\/4497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/comments?post=4497"}],"version-history":[{"count":3,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts\/4497\/revisions"}],"predecessor-version":[{"id":4785,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/posts\/4497\/revisions\/4785"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/media?parent=4497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/categories?post=4497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/wordpress-sites\/wp-json\/wp\/v2\/tags?post=4497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}