How to Display a Link to the Group’s Forum in the BuddyPress Group Directory

How to Display a Link to the Group’s Forum in the BuddyPress Group Directory

Paste this function into your theme’s functions.php file and it will add a link to the group’s forum within the group directory. Here’s a screenshot:

{code type=php}
function my_group_loop_forum_link() {

if ( !bp_group_is_forum_enabled() )
return;

if ( !bp_group_is_visible() )
return;

echo ‘Forum →‘;

}
add_action( ‘bp_directory_groups_actions’, ‘my_group_loop_forum_link’ );{/code}

*Note: This is for BuddyPress 1.2.3

Source: Rich Fuller at Etivite.com