BuddyDev

Search

[Resolved] badges – can be displayd in the same line with name ?

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #44166

    Hello,

    Please try the following code:

    
    add_filter( 'bbp_get_reply_author_link', function ( $link ) {
    
    	if ( function_exists( 'bp_user_badges_get_user_badges_html' ) ) {
    		$link = $link . bp_user_badges_get_user_badges_html( bbp_get_reply_author_id() );
    	}
    
    	return $link;
    } );
    
    

    and use the following CSS:

    
    .bbp-reply-author.item-avatar .bp-user-badges-badge-list {
        display: none;
    }
    

    Please check.

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 152
    讟诇讬讛 砖讜讜专抓 on #44181

    thanks a lot that looks great! but one more thing
    i assume this is excidentlly , the badge is also displayed outside the topic, see image please:
    https://drive.google.com/file/d/169GBQZw8r4nhc4j3tpKYpbFZcBND5Hs-/view?usp=sharing

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #44212

    Hello,

    Please try the following code:

    
    add_filter( 'bbp_get_reply_author_link', function ( $link ) {
    
    	if ( bbp_is_single_topic() && function_exists( 'bp_user_badges_get_user_badges_html' ) ) {
    		$link = $link . bp_user_badges_get_user_badges_html( bbp_get_reply_author_id() );
    	}
    
    	return $link;
    } );
    
    

    Append on single topic only

    Regards
    Ravi

  • Participant
    Level: Master
    Posts: 152
    讟诇讬讛 砖讜讜专抓 on #44216

    great!! your support is awsome!

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #44227

    Thank you for the acknowledgement. I am glad that I could help.

    Regards
    Ravi

The topic ‘ [Resolved] badges – can be displayd in the same line with name ?’ is closed to new replies.

This topic is: resolved