Skip to:
Content
Pages
Categories
Search
Top
Bottom

Code written in bp-custom.php is not taking effect.


  • joeyleblanc94
    Participant

    @joeyleblanc94

    Hi,

    I am using buddypress with Gwangi theme to make it a social media website, i want to hide private button on member when they are not friends.

    here’s my code.

    add_filter( 'bp_get_send_message_button', function( $array ) {
        if ( friends_check_friendship( bp_loggedin_user_id(), bp_displayed_user_id() ) ) {
            return $array;
        } else {
            return '';
        }
    } );

    What should i do and where should i apply my code to achieve the customisations.

  • You must be logged in to reply to this topic.
Skip to toolbar