BuddyDev

Search

[Resolved] Error on autocomplete mention on private message – Community Builder Pro theme

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #29579

    Hi Brajesh,

    It is working now. But it shows all users when “@” is typed. I want to show only the user’s friends as a suggestion.

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #29581

    Hi Sotiris,

    Thank you for confirming.

    The suggestion is a service provided by BuddyPress and only client side is enabled by the theme.

    It is possible to make it friends only but that will make the suggestions at other places friends only too.

    Here is a couple of line you can put in bp-custom.php or your child theme’s function.php

    
    
    /**
     * Make suggestions friends only.
     */
    add_filter( 'bp_members_suggestions_args', function ( $args ) {
    	$args['only_friends'] = true;
    
    	return $args;
    } );
    
    

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #29588

    Thank you,

    It works just fine now.

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #29609

    You are welcome. I am glad it is resolved. I sincerely appreciate your help in identifying and resolving it.

    Regards
    Brajesh

The topic ‘ [Resolved] Error on autocomplete mention on private message – Community Builder Pro theme’ is closed to new replies.

This topic is: resolved