Hello everyone! 🙂
I have a few groups where I would like for only admin/mods to be able to post new activity into groups. Users should be able to join the groups, but I don’t like them to be able to post in certain groups. I tried the following code I found, but didn’t work:
add_action( 'wp_footer', 'restrict_activity_to_admin' );
function restrict_activity_to_admin() {
global $bp;
if( $bp->groups->current_group->id == 46 ){
if( ! is_super_admin() ) {
?>
<style>
.bpfb_form_container{display: none;}
</style>
<script type="text/javascript">
jQuery(function() {
$('.bpfb_form_container').remove();
});
</script>
<?php
}
}
}
Anyone got any ideas on how to fix this? 🙂
Thank you!