Skip to:
Content
Pages
Categories
Search
Top
Bottom

Overriding bp_group_avatar function

  • @fairweb

    Participant

    Hi,

    I need to override the bp_group_avatar function. I tried the add_filter function which seems to have no effect at all. The aim is to display another image if it is found (I have no problem finding my image which is another part of my development). To make it simple, here is what I tried

    function my_group_avatar(){
    global $groups_template, $my_page_id;

    if ($my_page_id == NULL) {
    echo "afficher avatar" ;
    } else {
    echo "Afficher une autre image";
    }
    }

    add_filter( 'bp_group_avatar' , 'my_group_avatar',1,0);

    Any idea how I could do that ? For the moment, the function is located in a custom mu plugin but maybe it’s just in the wrong place or badly handled.

    Thanks for your help

  • The topic ‘Overriding bp_group_avatar function’ is closed to new replies.
Skip to toolbar