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

Reply To: Filtering search results based on ActiveMember360 permissions

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Filtering search results based on ActiveMember360 permissions Reply To: Filtering search results based on ActiveMember360 permissions

#24034
Ernest MarcinkoErnest Marcinko
Keymaster

Thank you, that worked perfectly.

So, I inspected the activemember API via their source code, and I may have found the solution. I have placed the following custom code to the functions.php file in your active child-theme directory:

add_filter('asp_results', 'asp_mbr_filter_posts', 10, 1);
function asp_mbr_filter_posts( $results ) {
  foreach ( $results as $k => $r ) {
    if ( !mbr_match_user_content($r->id) ) {
      unset($resuls[$k]);
    }
  }           
  
  return $results;
}

There was no documentation about this in their API, so I can only hope this is the correct function to use.