Re: [resolved] How can I give a request membership link to a private group
earlier post – Ok I am guessing that I need to pass a group object to the bp_get_group_join_button function and not the name of the group. So my next question is – is there a way to get a group object if I know a group name?
Managed to get it done finally.
`
<?php
global $wpdb;
$mgroup_name = “mygroupname”;
$myrows = $wpdb->get_results(“SELECT * FROM wp_bp_groups where slug=’$mgroup_name’;”, OBJECT);
if (count($myrows)>0) {
$group1 = $myrows[0];
$buttondata=bp_get_group_join_button($group1);
}
?>
var registrationbutton = “”;
`