Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Membership Site Search Set-Up Help › Reply To: Membership Site Search Set-Up Help
April 11, 2022 at 2:16 pm
#37475
Keymaster
That definitely needs some degree of custom coding – as it is not a WordPress core feature. I researched a bit in our past support tickets, and found one similar query from 2 years ago, where I suggested this code based on the API the customer was able to find:
add_filter('asp_results', 'asp_fix_groups_exclusions', 10, 1);
function asp_fix_groups_exclusions($results) {
// Group based exclusions
if ( class_exists('MeprRule') ) {
foreach ($results as $k => &$r) {
if ( isset($r->post_type) ) {
$post = get_post( $r->id );
if ( MeprRule::is_locked($post) )
unset($results[$k]);
}
}
}
return $results;
}
I don’t know if this worked, because he never responded.
Searching parts of a single page/cpt object is not possible. In wordpress all posts/cpt are stored as a separate object, thus the plugin can only return them as whole.