Skip to content

Instantly share code, notes, and snippets.

@mpro9x
Last active May 3, 2019 08:42
Show Gist options
  • Save mpro9x/92851fda82adabb3a24a1315040807e5 to your computer and use it in GitHub Desktop.
Save mpro9x/92851fda82adabb3a24a1315040807e5 to your computer and use it in GitHub Desktop.
adding banner to the single group page
<!---working area mahinur--->
<div class="ads_manage_style">
<?php
// check for a group ID
if( bp_has_groups() ) {
// Grab current group ID
bp_the_group();
$group_id = bp_get_group_ID();
}
// apply our changes only to this group ID's
// conditionnal action
// if i need same ads on multiple group, use this $group_id == 3 OR $group_id == 8
if ( $group_id == 3 OR $group_id == 8 ) {
echo do_shortcode('[bsa_pro_ad_space id=1]');
}
if ( $group_id == 2) {
echo do_shortcode('[bsa_pro_ad_space id=2]');
}
?>
</div>
<!---ending working area by mahinur--->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment