Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor zymeth25

    (@zymeth25)

    Hi

    There is currently no shortcode parameter for this.

    You can achieve this by creating a custom template and then using the get_avatar WP function, the function’s reference page contains information on how to use it and some useful examples.

    Thread Starter Alvaro Gois dos Santos

    (@alvarogois)

    Hi @zymeth25,

    Thank you for your reply. I couldn’t figure out a way of doing it. I’m using a custom template to change the order of fields, but adding the get_avatar code is not working (mainly because I’m not a dev, my coding skills suck).

    Thanks.

    Plugin Contributor zymeth25

    (@zymeth25)

    Understood ??

    I’ll write some example code for you when have more time.

    Thread Starter Alvaro Gois dos Santos

    (@alvarogois)

    You’re awesome. Sorry for bothering you with this.

    Plugin Contributor zymeth25

    (@zymeth25)

    Ok, here it is:

    //Show Author avatar
    $lcp_display_output .= get_avatar( get_the_author_meta( 'ID' ), 32 );

    Paste it into your template somewhere within the Loop. The second argument of the get_avatar function sets the avatar’s size, you may change it to whatever you like. Here as an example it is 32.

    • This reply was modified 6 years, 11 months ago by zymeth25.
    Thread Starter Alvaro Gois dos Santos

    (@alvarogois)

    Wow, I tried something very similar and it wasn’t working, the thumbnails got pilled up on top instead of being next to the post title, despite the code was inside the loop. With your code it’s working.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Is there a way to include author avatar?’ is closed to new replies.