Skip to:
Content
Pages
Categories
Search
Top
Bottom

member type body classes


  • Anonymous User 15484660
    Inactive

    @anonymized-15484660

    Hi,
    i would like to inject member types body classes to activity stream page.
    I tryed that:

    function yoostart_member_type_body_class( $classes = array() ){
        if (bp_is_activity_component() ) {
            if ($member_types = bp_get_member_type( bp_displayed_user_id() ) ) {
                foreach ($member_types as $member_type) {
                    $classes[] = sprintf( 'member-type-%s', esc_attr( $member_type ) );
                }
            }
        }
    }
    add_filter( 'bp_get_the_body_class', 'yoostart_member_type_body_class');

    but that create bug and remove others classes.

    Thanks

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