Hi @viche
Thank you for reaching us.
Please try to use this snippet:
<?php
/**
* Search Inside Current Group Form.
*/
function Search Inside Current Group Form() {
if ( ! bp_is_active( 'groups' ) ) {
return;
}
global $bp;
?>
<form action="<?php echo bp_get_group_permalink( $bp->groups->current_group ) . '?s=' ;?>" method="get">
<label for="group_search"><input type="text" name="s" id="group_search" placeholder="Search ..."></label>
<input type="submit" id="current_group_search_submit" value="Search">
</form>
<?php
}
add_shortcode( 'youzify_search_in_group_form', 'yzc_search_in_groups_form' );
Put it on bp-custom.php in the folder “wp-content/plugins”. If you don’t have it, pleae create a new file.
Best Regards, KaineLabs Team.