This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Single group activites help – Buddypress

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Single group activites help – Buddypress Reply To: Single group activites help – Buddypress

#22542
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

Well this might be possible, but only by making core changes to one of the plugin files, as well as using a custom code. Please follow the instcutions below:

1. Add this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

add_action('asp_layout_in_form', 'asp_add_bp_group_id', 10, 1);
function asp_add_bp_group_id() {
    $guid = @bp_get_group_id();
    if ( !empty($guid) )
     echo "<input type='hidden' name='bp_group_id' value='$guid'>";
}

2. Then replace the wp-content/plugins/ajax-search-pro/includes/classes/search/class-asp-search-buddypress.php file contents on your server with this.

Save the files, and reload the page. The results should be limited to the currently open group. This solution may not work in all cases though.