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

Reply To: Compliance with Buddypress Private Profiles

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Compliance with Buddypress Private Profiles Reply To: Compliance with Buddypress Private Profiles

#24814
Ernest MarcinkoErnest Marcinko
Keymaster

Hi Lyss,

Thank you very much. Well, a custom code will be required unfortunately.

Try adding 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_filter('asp_results', 'asp_filter_users_by');
function asp_filter_users_by($results) {
  foreach ($results as $k => &$r) {
    if ( $r->content_type == 'user' ) {
      $v = get_user_meta($r->id, 'yz_enable_private_account', true);
      if ( $v == 'on' ) {
        unset($results[$k]);
      }
    }  
  }
  return $results;
}

Please be careful, I obviously was not able to test this code. Thank you!