Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Last active May 11, 2022 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/56e30ba7c81beb39081016e1d5733ae2 to your computer and use it in GitHub Desktop.
Save KaineLabs/56e30ba7c81beb39081016e1d5733ae2 to your computer and use it in GitHub Desktop.
BuddyPress - Make Group Covers Clickable in Groups Directory Page
<?php
/**
* BuddyPress - Make group covers clickable in groups directory page.
*/
add_filter('youzify_group_profile_cover', 'custom_youzify_group_profile_cover', 999, 2);
function custom_youzify_group_profile_cover($group_cover, $group_id){
$group_link = bp_get_group_permalink($group_id);
if (!empty($group_link)) {
$group_cover = '<a href="' . $group_link . '">' . $group_cover . '</a>';
}
return $group_cover;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment