Support » Plugin: List category posts » Is there a way to include author avatar?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support 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.

    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 Support zymeth25

    (@zymeth25)

    Understood 🙂

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

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

    Plugin Support 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 2 months, 1 week ago by  zymeth25.

    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)
  • You must be logged in to reply to this topic.