This topic has 4 replies, 2 voices, and was last updated 8 years by Kieran_SQ.

  • Author
  • #167096
     vidjaylee
    Participant

    hi,

    buddydev’s developper give me that snippet to add a member type class in member profile,

    function buddydev_add_membertype_to_body_class( $classes = array() ) {

    if ( ! bp_is_user() ) {

    return $classes;

    }

    $member_types = bp_get_member_type( bp_displayed_user_id(), false );

    if ( ! $member_types ) {

    return $classes;

    }

    foreach ( $member_types as $member_type ) {

    $classes[] = ‘member-type-‘ . $member_type; // member-type-student etc.

    }

    return $classes;

    }

    add_filter( ‘bp_get_the_body_class’, ‘buddydev_add_membertype_to_body_class’ );

    how to add this class in member directory?

    my idea is displaying each member type profil by color

    #167101
     Kieran_SQ
    Moderator
    Not marked as solution
    #167114
     vidjaylee
    Participant
    Not marked as solution
    #167115
     vidjaylee
    Participant
    Not marked as solution
    #167116
     Kieran_SQ
    Moderator
    Not marked as solution
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?