BuddyDev

Search

[Resolved] Is it possible to place text on top of the profile avatar?

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #32715

    Hi Brajesh, is it possible to place text, like the user name or a button, on top of the img.avatar?

    Regards
    Carsten

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2942
    Ravi on #32740

    Hello Carsten,

    Thank you for posting. It will be better if you can provide a screenshot with details where you want to place the text. Please do let me know.

    Regards
    Ravi

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #32741

    Hi Ravi, sorry for this very unspecific question, what I wanted to know was, if it’s possible to hook an element like the send message button inside:

    img.avatar

    I can see now, that I of course can’t hook anything directly on top of the avatar, but I can hook an element inside div#item-header where img.avataris, and then with css move it on top of the avatar where I want it.

    I think this answers my own question? 😉

    Thanks!

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2942
    Ravi on #32742

    Hello Carsten,

    Sorry i was on wrong side. Please try the following code.

    
    add_action( 'bp_before_member_header_meta', function () {
    	echo sprintf( '<a href="%s">%s</a>', bp_displayed_user_domain(), __( 'View' ) );
    } );
    
    

    it will add a view link inside header content which is inside ‘div#item-header’

    Regards
    Ravi

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #32743

    Hi Ravi, thanks for the code snippet!

    Regards
    Carsten

The topic ‘ [Resolved] Is it possible to place text on top of the profile avatar?’ is closed to new replies.

This topic is: resolved