This topic has 3 replies, 3 voices, and was last updated 6 years by Radu.

  • Author
  • #196882
     vidjaylee
    Participant

    Hi,

    i would like to add a member types classes to buddypress activity, i tryed that but that don’t work :

    COPY CODE
    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');

    Regards

    Ahmed

    #196900
     Kieran_SQ
    Moderator

    Hi,

    I will assign this ticket to one of our developers who may be able to assist you with your custom query. They’ll be in touch with you as soon as they can, Monday to Friday, East European Time.

    Thanks,

    Kieran

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

    #196902
     vidjaylee
    Participant

    Thank you

    #196999
     Radu
    Moderator

    Hi

    I think you had forgot to add return $classes, check this https://pastebin.com/raw/7JFU79ZG

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?