Replies
- Lefteris on April 12, 2021 at 5:11 pm in reply to: [Resolved] Return in bp_members_suggestions_query_args only bp featured members #37672
Thank you so much Ravi for your help 🙂
Yes the code worked just fine.
How can i exlcude from the results the current user, so that he doesn’t have the option to find him self?
I have tried something like that
function buddydev_filter_buddypress_auto_complete_ids( $args ) { if ( ! function_exists( 'bp_featured_members' ) ) { return $args; } if ( is_user_logged_in() ) { $excluded = get_current_user_id(); } $args['meta_key'] = '_is_featured'; return $args; } add_filter( 'bp_members_suggestions_query_args', 'buddydev_filter_buddypress_auto_complete_ids' );