Skip to:
Content
Pages
Categories
Search
Top
Bottom

how do you put the buddypress avatar inside the div or i-tag?


  • pryde1919
    Participant

    @pryde1919

    Hi, how do you put the buddypress avatar inside the div or i-tag?
    I saw this code inside my php, it shows small icon before the author’s name, how can I change the fa fa-user icon into buddypress icon of the author?

    <i class=”fa fa-user”></i><span>’.get_the_author().'</span></div>’;

    Thankyou

Viewing 4 replies - 1 through 4 (of 4 total)

  • Henry Wright
    Moderator

    @henrywright

    I doubt <i class=”fa fa-user”></i> is inserted by BuddyPress. Is it generated by a plugin?


    pryde1919
    Participant

    @pryde1919

    Hi yes, it was not buddypress code, what I wanted is to substitute the <i class=”fa fa-user”></i> with buddypress avatar, and I don’t know what code shall I put to make it buddypress avatar. and yes it was generated by a plugin, it show author’s postname.


    pryde1919
    Participant

    @pryde1919

    still error let me paste the whole code: $output .= '<div class="pl-detailcnt">';

    this is the whole code:

    
    if($this->pw_grid_author=='no')
    {
    $output.='
    <div class="pl-postmeta" >
    <i class="fa fa-user"></i><span>'.get_the_author().'</span></div>';
     }
    

    danbp
    Participant

    @danbp

    You didn’t mention the theme you use, so it’s a bit difficult to help. Or where this code is placed.

    Read here, and maybe you can get something
    https://codex.wordpress.org/Function_Reference/get_avatar

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how do you put the buddypress avatar inside the div or i-tag?’ is closed to new replies.
Skip to toolbar