Last active
May 11, 2022 17:02
-
-
Save KaineLabs/56e30ba7c81beb39081016e1d5733ae2 to your computer and use it in GitHub Desktop.
BuddyPress - Make Group Covers Clickable in Groups Directory Page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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